Category: C#

C# Compiler Error – CS0310 ‘{2}’ must be a non-abstract type with a

In this blog post, you’ll learn more about the C# Compiler Error – CS0310 and the related message description C# Compiler Error Code CS0310 C# Compiler Description for the Code :CS0310 ‘{2}’ must be a non-abstract type with a public parameterless constructor in order to use it as parameter ‘{1}’ in the generic type or method ‘{0}’

How to sort an array using Comparator in C# ?

The Array.Sort method lets the developers pass the comparator which can be used to sort an array of objects. How to sort an array using Comparator in C# ? In the below example , the method CompareByName is used which lets the Array.Sort method to sort the array of objects in descending order.

C# Compiler Error – CS8095 length of string constant resulting from

In this blog post, you’ll learn more about the C# Compiler Error – CS8095 and the related message description C# Compiler Error Code CS8095 C# Compiler Description for the Code :CS8095 Length of String constant resulting from concatenation exceeds System.Int32.MaxValue. Try splitting the string into multiple constants.

How to Change the Start-up Project in Universal App ?

When launching the universal app from Microsoft Visual Studio 2013 , you can decide to run either the Windows Phone 8.1 project or Windows Store 8.1 app . How to Change the Start-up Project in Universal App ? To change the start-up project in Universal App when launching the app locally on Windows 8.1 PC , click the dropdown button that displays “Local Machine” and…

How to convert a string to integer in C# ?

You can convert a string to integer in C# using the following functions 1. Int32.Parse / int.Parse 2. Convert.ToInt32 3. Int.TryParse() How to convert a string to integer in C# ? Below is a sample sourcecode demonstrating the usage of the above functions The advantage of using the int.tryparse is that when the string (str) in the above example is a invalid number , a…

C# Compiler Error – CS1688 cannot convert anonymous method block wi

In this blog post, you’ll learn more about the C# Compiler Error – CS1688 and the related message description C# Compiler Error Code CS1688 C# Compiler Description for the Code :CS1688 Cannot convert anonymous method block without a parameter list to delegate type ‘{0}’ because it has one or more out parameters