Sean Sexton
Recent Posts
Top Posts
- #443 - An Interface Cannot Contain Fields
- #782 - You Can Create an Instance of a struct Without the new Keyword
- #535 - Creating a Generic Struct
- #1,219 - C# 6.0 - Filtering Exceptions
- #449 - You Can Pass an Interface Variable to a Method
- #43 - Objects Are Instantiated on the Heap
- Index
- #941 - Checking to See If Objects Are Disposable
- #349 - The Difference Between Virtual and Non-Virtual Methods
- #1,170 - You Can't Unsubscribe from an Event Using a Lambda Expression
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,793,998 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