Skip to main content
Difference between Convert.ToString() and ToString()

Difference between Convert.ToString() and ToString()

In this post, we will explain the difference between .ToString() and Convert.ToString() methods in C#. The basic difference between them is “Convert.ToString()” handles NULL values while “.ToString()” doesn’t. Which means if the variable being passed to Convert.ToString() is NULL, it won’t throw an exception. Whereas, “.ToString()” does not handle NULL values and it will throw […]

Read More

expression trees c#

Expression Trees in C# with an example

Before beginning with Expression Trees, let us first understand Expression in .NET In .NET, Expression is an abstract class which contains static methods and inherited by various types (like ParameterExpression, MethodCallExpression, BinaryExpression etc.) to create expression tree nodes of specific types. Also, all these expression-specific expression tree types are defined in System.Linq.Expressions namespace. Expression Trees […]

Read More