reference-source

What are the groups of four dashes in the .NET reference source code?

孤街醉人 提交于 2021-02-06 10:14:51
问题 I was browsing the source of the PluralizationService when I noticed something odd. In the class there are a couple of private dictionaries reflecting different pluralisation rules. For example: 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",

What does ----s mean in the context of StringBuilder.ToString()?

给你一囗甜甜゛ 提交于 2019-12-11 03:46:15
问题 The Reference Source page for stringbuilder.cs has this comment in the ToString method: 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; What does this mean? Is ----s something a malicious user might insert into a string to be formatted? 回答1: In the CoreCLR repository you have a

What does ----s mean in the context of StringBuilder.ToString()?

北城以北 提交于 2019-11-28 22:28:40
The Reference Source page for stringbuilder.cs has this comment in the ToString method: 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; What does this mean? Is ----s something a malicious user might insert into a string to be formatted? In the CoreCLR repository you have a fuller quote: Copy these into local variables so that they are stable even in the presence of race

What does ----s mean in the context of StringBuilder.ToString()?

只愿长相守 提交于 2019-11-27 14:21:12
问题 The Reference Source page for stringbuilder.cs has this comment in the ToString method: 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; What does this mean? Is ----s something a malicious user might insert into a string to be formatted? 回答1: In the CoreCLR repository you have a

Cannot step into .NET framework source code

与世无争的帅哥 提交于 2019-11-26 13:48:26
I am using Visual Studio 2013 and have a .NET 4.5.2 project. I have setup my settings according to following page: http://referencesource.microsoft.com/setup.html With this setup, I can see that all necessary symbols are downloaded and loaded but I cannot step into a code like the following: var cookieContainer = new System.Net.CookieContainer(); I am getting a Source Not Available message. I can step into the following code just fine: Console.WriteLine("test"); Do you have any idea why I can step into code from mscorlib.dll but cannot step into code from System.dll? and have a .NET 4.5.2

Cannot step into .NET framework source code

末鹿安然 提交于 2019-11-26 03:43:50
问题 I am using Visual Studio 2013 and have a .NET 4.5.2 project. I have setup my settings according to following page: http://referencesource.microsoft.com/setup.html With this setup, I can see that all necessary symbols are downloaded and loaded but I cannot step into a code like the following: var cookieContainer = new System.Net.CookieContainer(); I am getting a Source Not Available message. I can step into the following code just fine: Console.WriteLine(\"test\"); Do you have any idea why I