Category Archives: C#

Expression Bodied Local Function in C# 7.0

“Expression-bodied methods” were introduced with C# 6.0, that simplify the syntactic expression for methods in C#.  C# 7.0 extend this features for several new members including constructor, destructor, property assessors etc, and we have seen this one of our previous post – Expression – Bodied Members in C# 7.0. C# 7.0, also introduced local function by […]

Directly throw Exception as an Expression – Throw expressions in C# 7.0

In one of our previous post, Expression – Bodied Members in C# 7.0 , we have seen how C# 7.0 extended the expression bodied members features for several new members including  constructor, destructor, property assessors etc. C# 7.0 also introduces throw expressions, using which you can now throw an exception along with expression-bodied members, conditional expressions […]

Back to Basics : Difference Between int.Parse() and int.TryParse()

What is the difference between int.Parse() and int.TryParse() ? Or how the int.parse() is differ from int.TryParse() ? – yet another frequently  asked question in interview for the beginners, and I have seen confusion while answering this.  Let’s try to understand using simple example. To answer this in a sort way, the int.Parse() and int.TryPrase() […]