I apologize in advance, this feels like a really dumb question but I am genuinely stuck.  I get the following error:    I've circled in blue my main question. Is this the character position of the error?  And if so, how do I jump to it in my c# code in visual studio?
16924
When reading a stack trace like:  [FormatException: Input string was not in a correct format.]    System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer&amp; number, NumberFormatInfo info, Boolean parseDecimal) +2755599    System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +112    System.Convert.ToInt32(String value) +68   What do the +68, +112, etc. numbers mean. I'm guessing that they're offsets to something. If so, what?
78162
I collect a few corner cases and  and would always like to hear more. The page only really covers C# language bits and bobs, but I also find core .NET things interesting too. For example, here's one which isn't on the page, but which I find incredible:  string x = new string(new char[0]); string y = new string(new char[0]); Console.WriteLine(object.ReferenceEquals(x, y));   I'd expect that to print False - after all, "new" (with a reference type) always creates a new object, doesn't it? The specs for both C# and the CLI indicate that it should.  Well, not in this particular case. It prints True, and has done on every version of the framework I've tested it with. (I haven't tried it on Mono, admittedly...)  Just to be clear, this is only an example of the kind of thing I'm looking for - I wasn't particularly looking for discussion/explanation of this oddity. (It's not the same as normal string interning; in particular, string interning doesn't normally happen when a constructor is called.) I was really asking for similar odd behaviour.  Any other gems lurking out there?
113159
I'm not sure why I'm getting this error, but shouldn't this code compile, since I'm already checking to see if queue is getting initialized?   public static void Main(String[] args) {     Byte maxSize;     Queue queue;      if(args.Length != 0)     {         if(Byte.TryParse(args[0], out maxSize))             queue = new Queue(){MaxSize = maxSize};         else             Environment.Exit(0);     }     else     {         Environment.Exit(0);     }      for(Byte j = 0; j &lt; queue.MaxSize; j++)         queue.Insert(j);     for(Byte j = 0; j &lt; queue.MaxSize; j++)         Console.WriteLine(queue.Remove()); }   So if queue is not initialized, then the for loops aren't reachable right? Since the program already terminates with Environment.Exit(0)?  Hope ya'll can give me some pointers :)  Thanks.
96570
If "errored" is not a valid word, then how should I say:     The program errored at line 44   I guess I could say:     The program threw an error at line 44   But why is "errored" wrong? Is there a better alternative?
91739
I found myself writing:  \vspace 1 \baselineskip   and then when it's not compiling changing without thinking to:  \vskip 1 \baselineskip   but what is the difference? Perhaps knowing this will make me write the right one from the start in the future...
12823
In .NET, what is the difference between String.Empty and "", and are they interchangable, or is there some underlying reference or Localization issues around equality that String.Empty will ensure are not a problem?
14429
What's the difference between double quotes and single quote in C#?  I coded a program to count how many words are in a file  using System; using System.IO; namespace Consoleapp05 {     class Program     {         public static void Main(string[] args)         {             StreamReader sr = new StreamReader(@"C:\words.txt");             string text = sr.ReadToEnd();             int howmany = 0;             int howmany2 = 0;              for(int i = 0; i &lt; text.Length; i++)             {                 if(text[i] == " ")                 {                 howmany++;                 }             }             howmany2 = howmany + 1;             Console.WriteLine("It is {0} words in the file", howmany2);             Console.ReadKey(true);         }     } }   This gives me an error because of the double quotes. My teacher told me to use single quote instead, but he didn't tell me why. So what's the difference between double quotes and single quote in C#?
67482
What is the longest string that can be created in .NET? The docs for the String class are silent on this question as far as I can see, so an authoritative answer might require some knowledge of internals. Would the maximum change on a 64-bit system?  [This is asked more for curiosity than for practical use - I don't intend to create any code that uses gigantic strings!]
70797
I was shocked to find out today that C# does not support dynamic sized arrays. How then does a  developer used to using  deal with this in C#?  At the beginning of the function I am not sure of the upper bound of the array. This depends on the rows returned from the database.
80942
When I try to use one of the more "hacky" methods of getting a literal "special character" (such as backslash or a brace) then I get a different character: backslash seems to be an open quote, left brace a dash, and right brace a close quote.  What happened to my special characters?  \documentclass{minimal}  \begin{document}  \char`\\ \char`\{ \char`\}  \end{document}   produces: "-" (only the two "s are different).
94927
I tried to execute some code in a sandbox and I got an odd error message:     System.UnexpectedException: Invalid parameter value '****' for   parameter "Decryption Exception".    Looks like it happened immediately following a callout attempt...
78467
Earlier today I got this message:  Oops! Your edit couldn't be submitted because:   Edits must be at least 6 non-space characters; is there something else to improve in this post?   However, the purpose of my edit was to change the formatting for a message to show code.  There may have been other grammatical mistakes that could have been, but in general it is possible that there would not be.  What's the correct protocol to handle a situation like this?
16217
I've just read this  from Reddit.  They mention and and or being "Alternative Tokens" to &amp;&amp; and ||  I was really unaware of these until now. Of course, everybody knows about the , but and and or? Since when? Is this a recent addition to the standard?  I've just checked it with Visual C++ 2008 and it doesn't seem to recognize these as anything other than a syntax error. What's going on?
63397
I'm always surprised that even after using C# for all this time now, I still manage to find things I didn't know about...  I've tried searching the internet for this, but using the "~" in a search isn't working for me so well and I didn't find anything on MSDN either (not to say it isn't there)  I saw this snippet of code recently, what does the tilde(~) mean?  /// &lt;summary&gt; /// Enumerates the ways a customer may purchase goods. /// &lt;/summary&gt; [Flags] public enum PurchaseMethod {        All = ~0,     None =  0,     Cash =  1,     Check =  2,     CreditCard =  4 }   I was a little surprised to see it so I tried to compile it, and it worked... but I still don't know what it means/does. Any help??
8886
I've seen this done in Borland's  environment, but I'm not sure how to go about it for a C# application I'm working on. Are there best practices or gotchas to look out for?
116815
I just saw a  from a user asking about a C# stack trace.  It was a valid programming question for someone with little experience, yet it was marked down twice.  I've always believed that there are no stupid questions. Am I wrong?
11153
I am getting above ugly error.How to clean the error without custom error handing in controller.  &lt;apex:page standardController="Account" extensions="EventController"&gt;  &lt;apex:form &gt; &lt;apex:pageMessages&gt;&lt;/apex:pageMessages&gt; &lt;apex:pageBlock &gt; &lt;p&gt; Please select  &lt;/p&gt; &lt;apex:selectRadio value="{!selectType}" required="true"&gt;  &lt;apex:selectOptions value="{!Option}"/&gt; &lt;/apex:selectRadio&gt; &lt;apex:commandButton value="Next" action="{!next}"/&gt; &lt;/apex:pageBlock&gt; &lt;/apex:form&gt; &lt;/apex:page&gt;