这里把符合以下条件的对象称为伪数组: 1.具有length属性 2.按索引方式存储数据 3.不具有数组的push.pop等方法 伪数组(类数组):无法直接调用数组方法或期望length属性有什么特殊的行为,不具有数组的push.pop等方法,但仍可以对真正数据遍历方法来遍历它们.典型的是函数document.childNodes之类的,它们返回的NodeList对象都属于伪数组. 可以使用以下函数将伪数组转化为真正的Array对象(兼容问题处理). function makeArray( c )
最近在使用结构体与字节数组转化来实现socket间数据传输.现在开始整理一下.对于Marshal可以查阅msdn,关于字节数组与结构体转代码如下: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Runtime.InteropServices; namespace FileSendClient { [StructL