stringbuilder.cs的Reference Source页面在ToString方法中有以下注释 :
if (chunk.m_ChunkLength > 0)
{
// Copy these into local variables so that they
// are stable even in the presence of ----s (hackers might do this)
char[] sourceArray = chunk.m_ChunkChars;
int chunkOffset = chunk.m_ChunkOffset;
int chunkLength = chunk.m_ChunkLength;
Run Code Online (Sandbox Code Playgroud)
这是什么意思?被----s一些恶意用户可能会插入一个字符串格式化?
我正在使用Visual Studio 2013并拥有一个.NET 4.5.2项目.我根据以下页面设置了我的设置:
http://referencesource.microsoft.com/setup.html
通过此设置,我可以看到所有必需的符号都已下载并加载,但我无法进入如下代码:
var cookieContainer = new System.Net.CookieContainer();
Run Code Online (Sandbox Code Playgroud)
我收到源不可用消息.
我可以很好地进入下面的代码:
Console.WriteLine("test");
Run Code Online (Sandbox Code Playgroud)
您是否知道为什么我可以从mscorlib.dll进入代码但无法从System.dll进入代码?
PluralizationService当我发现奇怪的东西时,我正在浏览源头.在课堂上有几个反映不同复数规则的私人词典.例如:
private string[] _uninflectiveWordList =
new string[] {
"bison", "flounder", "pliers", "bream", "gallows", "proceedings",
"breeches", "graffiti", "rabies", "britches", "headquarters", "salmon",
"carp", "----", "scissors", "ch----is", "high-jinks", "sea-bass",
"clippers", "homework", "series", "cod", "innings", "shears", "contretemps",
"jackanapes", "species", "corps", "mackerel", "swine", "debris", "measles",
"trout", "diabetes", "mews", "tuna", "djinn", "mumps", "whiting", "eland",
"news", "wildebeest", "elk", "pincers", "police", "hair", "ice", "chaos",
"milk", "cotton", "pneumonoultramicroscopicsilicovolcanoconiosis",
"information", "aircraft", "scabies", "traffic", "corn", "millet", "rice",
"hay", "----", "tobacco", "cabbage", "okra", "broccoli", "asparagus",
"lettuce", "beef", "pork", "venison", "mutton", "cattle", …Run Code Online (Sandbox Code Playgroud) SYMSRV: http://referencesource.microsoft.com/symbols/System.Web.pdb/E6EBD6B61CEA407591438CC4E48036891/System.Web.pdb not found
http://referencesource.microsoft.com/symbols: Symbols not found on symbol server.
SYMSRV: System.Web.pdb from http://msdl.microsoft.com/download/symbols: 131401 bytes
http://msdl.microsoft.com/download/symbols: Symbols downloaded from symbol server.
C:\Users\Micah\Symbols\System.Web.pdb\E6EBD6B61CEA407591438CC4E48036891\System.Web.pdb: Symbols loaded.
Run Code Online (Sandbox Code Playgroud)
注意它是如何无法找到System.Web.pdb的referencesource.microsoft.com.它发现它,msdl.microsoft.com但那些没有源文件/行.我已经下载的源代码System.Web.dll来自referencesource.microsoft.com所以我知道源可用.根据我的理解,referencesource.microsoft.com应该为所有已发布的.NET Framework版本(包括补丁)提供PDB?
的版本System.Web.dll当前正在加载是发现在GAC标记为版的64位版本4.0.30319.34212.它的发布日期为5/29/2014.据我所知,这是最新版本System.Web.dll,但如果我错了,我不介意升级,如果它解决了这个问题.
为什么在源代码中Int32使用?在C#中不相等?那么原始的源代码是什么?我糊涂了..intInt32intint
[Serializable]
[System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
[System.Runtime.InteropServices.ComVisible(true)]
#if GENERICS_WORK
public struct Int32 : IComparable, IFormattable, IConvertible
, IComparable<Int32>, IEquatable<Int32>
/// , IArithmetic<Int32>
#else
public struct Int32 : IComparable, IFormattable, IConvertible
#endif
{
internal int m_value; // Here????
public const int MaxValue = 0x7fffffff;
public const int MinValue = unchecked((int)0x80000000);
...
}
Run Code Online (Sandbox Code Playgroud)
之间存在相同的问题Boolean和bool太多.