• String and StringBuilder both are nothing more than a class, but there is a big difference between them.  String is immutable which means it is not liable to change whereas StringBuilder is mutable which means it is liable to change.  String class is part of System namespace.  StringBuilder class is […]

    Difference Between String & StringBuilder Class

    String and StringBuilder both are nothing more than a class, but there is a big difference between them.  String is immutable which means it is not liable to change whereas StringBuilder is mutable which means it is liable to change.  String class is part of System namespace.  StringBuilder class is […]

    Continue Reading...

  • In the previous tutorial, we have seen how ToString() method works and how to override it.  For built-in types, it works fine but for complex types it will return their type.  There is another method which is pretty much similar to ToString() method and that is Convert.ToString().  But there is […]

    Difference Between ToString() Method and Convert.ToString() Method

    In the previous tutorial, we have seen how ToString() method works and how to override it.  For built-in types, it works fine but for complex types it will return their type.  There is another method which is pretty much similar to ToString() method and that is Convert.ToString().  But there is […]

    Continue Reading...

  • In dotnet, every type directly or directly inherit from Object class.  Object class contains some methods like ToString(), GetHashCode(), Equals(), etc and all of these methods are available to all the derived classes.  As the name suggests, ToString() works fine with the built in types but in case of complex […]

    ToString() Method Overriding in C# with Example

    In dotnet, every type directly or directly inherit from Object class.  Object class contains some methods like ToString(), GetHashCode(), Equals(), etc and all of these methods are available to all the derived classes.  As the name suggests, ToString() works fine with the built in types but in case of complex […]

    Continue Reading...

  • In general, when we want to create a collection of items, we make use of arrays due to their strongly typed nature.  The only drawback which we experience is that they cannot grow in size.  Their size depend upon their initialization. Due to this reason, in dotnet v1.0, collections were […]

    What are Generics in C# with Example

    In general, when we want to create a collection of items, we make use of arrays due to their strongly typed nature.  The only drawback which we experience is that they cannot grow in size.  Their size depend upon their initialization. Due to this reason, in dotnet v1.0, collections were […]

    Continue Reading...

  • In dotnet, whenever you compile an application, an assembly is generated.  That assembly could be an executable file or a dll file.  As we know, all dotnet applications contains MSIL or CIL code which is converted to machine specific code by JIT compiler at runtime.  Apart from MSIL code, a […]

    Reflection in C# with Example

    In dotnet, whenever you compile an application, an assembly is generated.  That assembly could be an executable file or a dll file.  As we know, all dotnet applications contains MSIL or CIL code which is converted to machine specific code by JIT compiler at runtime.  Apart from MSIL code, a […]

    Continue Reading...

  • LINQ Aggregate methods help in various common calculations like getting average, count, sum etc of values in a collection.  In C#, we have 6 LINQ Aggregate methods. Min():  This method will give us lowest value in a collection. Max():  This method will give us highest value in a collection. Average():  […]

    LINQ Aggregate Methods in C#

    LINQ Aggregate methods help in various common calculations like getting average, count, sum etc of values in a collection.  In C#, we have 6 LINQ Aggregate methods. Min():  This method will give us lowest value in a collection. Max():  This method will give us highest value in a collection. Average():  […]

    Continue Reading...

  • LINQ stands for Language Integrated Query.  LINQ enables us to query various type of data sources such as SQL server, XML documents,  in memory objects like arrays and generics.  In general, if you want to fetch a data from a data source, then you must need to have some technical […]

    What is LINQ in C#

    LINQ stands for Language Integrated Query.  LINQ enables us to query various type of data sources such as SQL server, XML documents,  in memory objects like arrays and generics.  In general, if you want to fetch a data from a data source, then you must need to have some technical […]

    Continue Reading...

  • Extension methods were introduced in dotnet framework 3.5.  Extension methods are basically an instance methods which are added to an existing type without creating a new derived type, recompiling, or originally modifying the code.  C# dotnet framework has provided us a lot of extension methods like where, aggregate, average etc. […]

    Extension Methods in C#

    Extension methods were introduced in dotnet framework 3.5.  Extension methods are basically an instance methods which are added to an existing type without creating a new derived type, recompiling, or originally modifying the code.  C# dotnet framework has provided us a lot of extension methods like where, aggregate, average etc. […]

    Continue Reading...

  • Associative arrays are object-indexed collection of items.  They are also known as key-value pairs where index act as key and its item act as value.   A simple array is used when you want to create collection of items and you want to store them in a certain order.  An associative […]

    Associative Arrays in PHP

    Associative arrays are object-indexed collection of items.  They are also known as key-value pairs where index act as key and its item act as value.   A simple array is used when you want to create collection of items and you want to store them in a certain order.  An associative […]

    Continue Reading...

  • Arrays are nothing more than an integer-indexed collection of items.  An index of an array always starts from 0.  The collection of items in an array could be of any data type like string, int, float or even an another array which forms a nested array.  The length of an […]

    Arrays in PHP

    Arrays are nothing more than an integer-indexed collection of items.  An index of an array always starts from 0.  The collection of items in an array could be of any data type like string, int, float or even an another array which forms a nested array.  The length of an […]

    Continue Reading...