Linked Questions

1 vote
2 answers
7k views

I want to make sure I'm using C# 7.0 or higher. Does anyone know an easy way of checking this? I use Visual Studio Community on a MacBook and cannot seem to find an easy way of checking or setting ...
user avatar
-1 votes
1 answer
288 views

I use C# for .NET. I know how to programmatically detect CLR version of a .NET assembly, but can’t find out how to programmatically detect the C# version in my code. Anyone has idea? TIA.
Frank's user avatar
  • 166
2923 votes
13 answers
441k views

What are the correct version numbers for C#? What came out when? Why can't I find any answers about C# 3.5? This question is primarily to aid those who are searching for an answer using an incorrect ...
35 votes
4 answers
10k views

I'm using VS2017 RC and my application targets net framework 4.6.1. I have two assemblies referencing System.ValueTuple 4.3 MyProject.Services MyProject.WebApi In MyProject.Services I have a class ...
JuChom's user avatar
  • 6,099
16 votes
2 answers
42k views

I am learning ASP.Net MVC 5 and I want to set default value using data annotation for boolean property. Also I don't want to use the constructor to set the default value. Is it possible? public class ...
Unbreakable's user avatar
  • 8,172
22 votes
3 answers
17k views

I know that C# version depends on .NET Framework. But .NET Core which version uses? Particularly .NET Core 2? C#7?
Alexan's user avatar
  • 8,715
11 votes
2 answers
12k views

Is there any command to get the C# compiler version? The csc command seams has no option to show compiler version. P.S when I enter csc command in Developer Command Prompt For VS2015 it returns: ...
ma.mehralian's user avatar
  • 1,305
8 votes
3 answers
4k views

I've discovered that the csc.exe binary that comes with Roslyn can take a -langversion:<string> command line argument in order to set the version of C# I would like to compile. But how do I ...
Aaron Beaudoin's user avatar
2 votes
2 answers
3k views

How do I tell what version of Objective-C I'm using? I'm using a Mac with xCode. The reason I ask is because i have a book "Objective-C 3.0" and it says that you can declare an ...
user avatar
5 votes
1 answer
1k views

I'm trying to use System.CommandLine and I've installed the nuget package: Install-Package System.CommandLine -Version 2.0.0-beta1.21308.1 According to this Microsoft article, I should be able to ...
sashoalm's user avatar
  • 80.5k
2 votes
1 answer
3k views

I have a project running .NET Framework 4.8 and in the project's properties under "Build > Advanced > Language Version" Visual Studio states "Automatically selected based on ...
mike's user avatar
  • 1,774
1 vote
2 answers
2k views

Here I have these Classes: public class CustomerDebt { public int ID { get; set; } public string Name { get; set; } public string Family { get; set; } public string Remain { get; set; ...
Inside Man's user avatar
  • 4,219
-2 votes
1 answer
2k views

I have a simple SQL statement query that is executed as command from C# code. It is targetting DB2. I created variables for the server/schemas as follows. It throws error. private const string ...
Jasmine's user avatar
  • 5,317
0 votes
4 answers
134 views

I have the following classes: class Given { public string text = ""; public List<StartCondition> start_conditions = new List<StartCondition>(); }; class StartCondition { ...
code_fodder's user avatar
  • 16.6k
0 votes
4 answers
452 views

Following line throw exception if there is no matching record found. Guid stuId= context.Students.FirstOrDefault(x => x.Name == student.Name).Id; I understand, i can handle above line var stuId= ...
simbada's user avatar
  • 990

15 30 50 per page