Linked Questions
18 questions linked to/from What characters are allowed in C# class name?
-1 votes
1 answer
658 views
Is there any restriction for writing property names C# [duplicate]
I've written a class definition like public class Item { public double? 30dhi { get; set; } public double? 30dlo { get; set; } public double? 7dhi { get;...
0 votes
1 answer
4k views
Illegal characters in class names [duplicate]
Possible Duplicate: What characters are allowed in C# class name? I'm using edmgen to dynamically create classes from my database. But it seems like some of the characters in table names are ...
-2 votes
1 answer
839 views
Can we have class name with alphanumeric character? [duplicate]
Can we name class using alphanumeric values ?like class Tier1, Tier2 and so on.Is this come under good practice. What is the recommendation around naming class. I know this is very generic question ...
16 votes
4 answers
2k views
How to find all static constructors?
I have a large Visual Studio solution of many C# projects. How to find all the static constructors? We had a few bugs where some did silly things, I want to check the others.
6 votes
4 answers
26k views
C# variable names with special character
I want to include some special characters in a string variable name in C#. Example: string foo-bar = String.Empty; As far as my understand I can't declare a variable as I mentioned in the above ...
8 votes
3 answers
851 views
Is using non standard English characters in c# names a bad practice? [closed]
English is not my native language. I would like to use non-English characters in my code, for instance: "ç, ã, é ..." Is it a bad practice to use those characters for classes, variable or method ...
7 votes
1 answer
2k views
(_) => DoWork(); How an underscore is valid as a anonymous delegate parameter?
In an excellent answer about starting a timer immediately, I could see the following code: timer.Elapsed += timer_Elapsed; ThreadPool.QueueUserWorkItem((_) => DoWork()); ... void ...
8 votes
1 answer
1k views
Unicode class names in C# - why do some work, when others don't?
I'm wondering why this is. I have two unicode characters from the same group Ll, which is allowed according to the specs: http://msdn.microsoft.com/en-us/library/aa664670%28VS.71%29.aspx One of them ...
4 votes
1 answer
2k views
What characters are allowed in F# identifiers, module, type and member names?
This question is about characters in identifiers, not keywords as identifiers. I found this question on C# names, but couldn't readily find the same on F#. Normally this is hardly relevant, but in my ...
1 vote
2 answers
2k views
Is it ok to use a non-English, foreign language variable name? [closed]
For me, English is too big a mountain. So whenever I use tools like Visual Studio 2017 (C ++), Unity 3D(C#), Visual Studio Code (html), Eclipse (java), and Android Studio, I've always assigned ...
0 votes
1 answer
1k views
EF Core migration error: PositionalParameterNotFound,Add-Migration
I'm working with EntityFrameWork When I try to Run Command Add-Migration, I'm getting the following error Add-Migration migration space + CategoryInfo : InvalidArgument: (:) [Add-Migration], ...
2 votes
2 answers
811 views
C# Escaping String Identifier When Declaring Variable
Is there a way to declare a variable that has symbol involved? Such as: int MIN% = 0; or string DE/M = "";
1 vote
1 answer
1k views
Class naming alternatives to the underscore?
Dashes - can't be used in C# to name classes. Are there any good character alternatives, other than underscores? _ I'm looking for a character to add some readability to longer class names. Thanks! ...
0 votes
1 answer
410 views
Entity Framework: List of invalid characters in Entity Name
I am working on a designer which is very similar to Edmx designer in Visual Studio. I want to add the same validation that Edmx designer applies to Entity and Property Names. Can someone share what ...
0 votes
1 answer
200 views
There is braces in a C# Class name
I have a class from somewhere. The name is strange, it is called "Something[into]ABC.cs". Is it valid for "[into]" in a class name?