Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/332.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在C#中的成员名称中使用角括号意味着什么?_C#_Syntax_Disassembly_.net_Dotpeek - Fatal编程技术网

在C#中的成员名称中使用角括号意味着什么?

在C#中的成员名称中使用角括号意味着什么?,c#,syntax,disassembly,.net,dotpeek,C#,Syntax,Disassembly,.net,Dotpeek,我在使用DotPeek浏览PresentationCore.dll的源代码时发现: // Type: MS.Internal.TtfDelta.CMAP_HEADER // Assembly: PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 // Assembly location: D:\Windows\Microsoft.NET\assembly\GAC_64\Presen

我在使用DotPeek浏览PresentationCore.dll的源代码时发现:

// Type: MS.Internal.TtfDelta.CMAP_HEADER
// Assembly: PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
// Assembly location: D:\Windows\Microsoft.NET\assembly\GAC_64\PresentationCore\v4.0_4.0.0.0__31bf3856ad364e35\PresentationCore.dll

using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace MS.Internal.TtfDelta
{
  [NativeCppClass]
  [StructLayout(LayoutKind.Sequential, Size = 4)]
  internal struct CMAP_HEADER
  {
    private short <alignment member>;
  }
}
//类型:MS.Internal.TtfDelta.CMAP\u头
//程序集:PresentationCore,版本=4.0.0.0,区域性=中性,PublicKeyToken=31bf3856ad364e35
//程序集位置:D:\Windows\Microsoft.NET\Assembly\GAC\U 64\PresentationCore\v4.0\U 4.0.0.0\UU 31bf3856ad364e35\PresentationCore.dll
使用System.Runtime.CompilerServices;
使用System.Runtime.InteropServices;
命名空间MS.Internal.TtfDelta
{
[NativeCppClass]
[StructLayout(LayoutKind.Sequential,Size=4)]
内部结构CMAP_头
{
私人卖空;
}
}

什么是“
private short
”意思?

有时反汇编程序不知道代码的实际成员是什么,它会使用“猜测”类型

反汇编程序为我们提供了伪代码,即使它在.NET Framework上使用dotPeek时非常准确,但它仍然不是“真实”代码,就像以下HashEntry类中的
base.ctor
调用一样:

private class HashEntry
{
  public string[] names;
  public ulong[] values;

  public HashEntry(string[] names, ulong[] values)
  {
    base.\u002Ector();
    this.names = names;
    this.values = values;
  }
}

我从mscorlib获取的数据完美地证明了这一点。

我只能认为这是DotPeek添加的内容。是的,它作为C#源代码无效。