Sean Sexton
Recent Posts
Top Posts
- #982 - An Enum Type Can Store a Maximum of 32 Flags
- #443 - An Interface Cannot Contain Fields
- #349 - The Difference Between Virtual and Non-Virtual Methods
- #1,191 - Lambda Can't Capture ref or out Parameters
- #1,120 - The Iteration Variable in a foreach Loop Is Read-Only
- #143 - An Example of Implementing ICloneable for Deep Copies
- #216 - Null-Coalescing (??) Operator Is Equivalent to GetValueOrDefault Method
- #724 - Fully Qualified Names for Types
- #387 - Static Events vs. Static Event Handler Methods
- #913 - How to Document that a Method Can Throw an Exception
Tags
#define #if 6.0 Accessibility Anonymous Types Arguments Array Arrays Basics Boxing C# catch Class Class Diagram Classes Collections Constants Constructor Constructors Conversions Covariance Data Types Deep Copy Delegate Delegates Enum Enumeration Equals Events Exceptions Fields Finalizer Floating Point foreach Garbage Collection Generic Generics Heap IEnumerable Inheritance Intellisense Interface Interfaces Lambda Expression Main Memory Methods Miscellaneous Namespaces new null Nullable Object Object Initializer Operators Optional Parameters override Parameters Patterns Polymorphism Private Properties Public Reference Types Statements Static Strings struct Throw try Unicode Value Types Variables virtual Visual StudioBlog Stats
- 2,840,216 hits
#475 – Comments Occuring within String Literals Are Treated as Part of the String
December 14, 2011 Leave a comment
Recall that comments in C# can be of two forms–either single line or delimited comments.
If something that looks like a comment appears within a string, it isn’t treated by the compiler as a comment, but just as part of the string.
Filed under Basics Tagged with Basics, C#, Comments