日期:2014-05-17 浏览次数:21219 次
public struct Repository
{
public Repository()
{
}
/// <summary>
/// 仓库名称
/// </summary>
[FieldOffset(0)]
[MarshalAs(UnmanagedType.选哪一个,后面n多参数该怎么填写。。。)]
public string Name{get;set;}
/// <summary>
/// 指针
/// </summary>
[FieldOffset(128)]
public ushort location{get;set;}
}
[StructLayout(LayoutKind.Explicit,Pack=1,CharSet=CharSet.Unicode,Size=64)]
public unsafe struct Repository
{
/// <summary>
/// 仓库名称
/// </summary>
[FieldOffset(0)]
public fixed char Name[32];
/// <summary>
/// 指针
/// </summary>
[FieldOffset(128)]
public ushort location;
}
Repository