Interviews14 answers
Explain any three C# 6 New Features ?
14 Answers
For complete features of C# 6.0 please visit
https://interview-preparation-for-you.blogspot.in/2017/02/c-60-features.html
Khaleek AhmadPosted Feb 2, 2017, 8:30 PM EST
For complete features of C# 6.0 please visit
https://interview-preparation-for-you.blogspot.in/2017/02/c-60-features.html
Khaleek AhmadPosted Feb 2, 2017, 8:30 PM EST
For complete features of C# 6.0 please visit
https://interview-preparation-for-you.blogspot.in/2017/02/c-60-features.html
Khaleek AhmadPosted Feb 2, 2017, 8:30 PM EST
(1) String interpolation by using symbol $ , (2) "Auto Property Initializer " which allows to initialize a property at declaration time E.g public string Country { get;} = "Country"; (3) Importing a class just like importing a namespace and consume each and every static member of the class directly in the code without a class name prefix again E.g.
using static System.Console;
class UsingStatic { static void Main() { WriteLine("Hello"); } }
Sandeep SinghPosted Aug 19, 2016, 12:52 AM EDT
1)Await in catch and finally blocks
2)Initializers for auto-properties
3)nameof expressions
Chetan RaiyaniPosted Jun 24, 2016, 4:06 AM EDT
Static Using Syntax, Auto-Property Initializers ,Dictionary Initializers ,String Interpolation ,nameOf Expression ,Exception Filters etc,.
Keerthi VenkatesanPosted Jun 7, 2016, 10:00 PM EDT
Exception Filters,
String Format using $,
Auto Property Intializer
Bhuvanesh MohankumarPosted May 29, 2016, 7:13 AM EDT
1.You can create inline functions,
Example: public int addNumbers(int a,int b) => a b;
2. You can declare static using,
Example: using static System.Math;
This would simplify the usage of Mathematical functions like Math.Pow(a,b). Instead of Math.Pow(a,b) you could use Pow(a,b)
3. It is now possible to declare the auto-properties,
Example: public string FirstName { get; set; } = "Ervis";
Ervis TrupjaPosted May 27, 2016, 7:03 AM EDT
http://www.codeproject.com/Articles/327916/C-Language-Features-From-C-to
pankaj singhPosted May 25, 2016, 11:59 AM EDT
https://www.simple-talk.com/dotnet/.net-framework/whats-new-in-c-6/
Munesh SharmaPosted May 9, 2016, 8:39 AM EDT
Please refer to below link
http://www.codeproject.com/Tips/1023426/Whats-New-in-Csharp
Vivek KumarPosted Apr 17, 2016, 1:52 AM EDT
1. Auto property initializer
2. await in catch and finally block.
3. New way for Exception filters.
Anil JhaPosted Mar 2, 2016, 1:48 AM EST
With C# 6, you can now add the using static qualifier and reference
Example:
using static System.Console;
namespace CSharpSix
{
class Program
{
static void Main(string[] args)
{
WriteLine("Hello World!");
}
}
}
Amit VermaPosted Feb 5, 2016, 4:03 AM EST
To explore new features in c#6 please refer to
http://www.c-sharpcorner.com/UploadFile/201fc1/experimenting-with-C-Sharp-6s-new-features/
Anil Kumar MurmuPosted Feb 1, 2016, 8:41 PM EST










