Tag Archives: C#

Expression – Bodied Members in C# 7.0

Expression-bodied methods was introduced with C# 6.0, that simplify the syntactic expression for methods in C#. We have seen this for Methods and Properties in the previous version of C#. C# 7.0 extend this features for several new members including  constructor, destructor, property assessors etc.

Back to Basic : 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() […]

Use C# Interactive Window for your coding experiment in Visual Studio 2015

The Interactive Window in Visual Studio is a great utility to play around the code, language features, API’s and other .NET framework features. It is a REPL  (Read–eval–print loop) that provides us an environment for live coding and evaluate expression or code snippet based on our inputs. The Interactive Window also support features like IntelliSense, […]

Back to Basic – string Vs. String in C#

One of the frequent question that comes during the .NET interview is “What is the difference between string and String?” . This one is a very simple question but can make you confused during the interview. So, let’s try to recall and check what exactly they are. To answer this question in a short, The two […]

Back to Basic – Events in C#

In order to understand Events, let’s first understand what Publisher Subscriber model is: According to the Wikipedia publisher subscriber model is a messaging pattern where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers. Instead, published messages without knowledge of what, if any, subscribers there may be. Similarly, subscribers […]

Back To Basic – Delegate in C#

A delegate person is someone who represent an organization or set of people. In C# world a delegate is a reference type variable that represent one or set of methods by holding there reference. Note: The reference can be changed at runtime.  So let’s first understand what it meant. Let’s have a class called BasicMaths having two methods Add […]