Category: C#
C# Compiler Error – CS1686 local ‘{0}’ or its members cannot have t
In this blog post, you’ll learn more about the C# Compiler Error – CS1686 and the related message description C# Compiler Error Code CS1686 C# Compiler Description for the Code :CS1686 Local ‘{0}’ or its members cannot have their address taken and be used inside an anonymous method or lambda expression
C# Program to print the sum of two numbers
Problem Write a program in C# to add two numbers and display the result in copnsole window. How to print the sum of two numbers in C# ? Output Abundantcode.com coding sample 35
How to get the AM or PM value from a DateTime object in C# ?
There are times when you might want to get only the string AM or PM from the DateTime object that you have. How to get the AM or PM value from a DateTime object in C# ? You can get this by using the format specifiers in the ToString method as shown in the code snippet.
How to Create Comma Separated Strings from List of Strings in C#?
Below is a sample code snippet that demonstrates how one can easily create the comma separated strings from List<string> in C#. How to Create Comma Separated Strings from List of Strings in C#?
C# Compiler Error – CS1106 extension method must be defined in a no
In this blog post, you’ll learn more about the C# Compiler Error – CS1106 and the related message description C# Compiler Error Code CS1106 C# Compiler Description for the Code :CS1106 Extension method must be defined in a non-generic static class
C# Compiler Error – CS7098 linked netmodule metadata must provide a
In this blog post, you’ll learn more about the C# Compiler Error – CS7098 and the related message description C# Compiler Error Code CS7098 C# Compiler Description for the Code :CS7098 Linked netmodule metadata must provide a full PE image: ‘{0}’.
How to Use the Conditional Operator (?) in C# ?
Conditional Operator is also called as ternary operator which lets the developers to select between 2 values with a statement. Assume that you have to check for a number if it is even , we generally tend to use the if else statement . The same can be achieved using the ternary operator in C#. How to Use the Conditional Operator (?) in C# ?…
C# Compiler Error – CS1521 invalid base type
In this blog post, you’ll learn more about the C# Compiler Error – CS1521 and the related message description C# Compiler Error Code CS1521 C# Compiler Description for the Code :CS1521 Invalid base type
C# Compiler Warning – CS8885 the ‘this’ object cannot be used before
In this blog post, you’ll learn more about the C# Compiler Warning – CS8885 and the related message description C# Compiler Warning Code CS8885 C# Compiler Description for the Code :CS8885 The ‘this’ object cannot be used before all of its fields have been assigned
How to Get the Top 5 elements from a List in C# ?
If you want to get the top 5 elements from a list in C# or skip the first item and get the next five elements from a List , you can use the Take and the Skip methods. How to Get the Top 5 elements from a List in C# ? Below is a sample code snippet demonstrating the usage of the Skip and Take…
Upgrading Windows Phone 7.5 App to Windows Phone 8 in Visual Studio 2012.
If you want to utilize the capabilities or the features of Windows Phone 8 in your Windows Phone 7.5 project, you might need to upgrade it to Windows Phone 8. Once you upgrade your Windows Phone 7.5 project to Windows Phone 8, you cannot revert back and hence it always better to copy/backup your Windows Phone 7.5 project before upgrading. Upgrading Windows Phone 7.5 App…
C# Compiler Error – CS4021 the callerfilepathattribute may only be
In this blog post, you’ll learn more about the C# Compiler Error – CS4021 and the related message description C# Compiler Error Code CS4021 C# Compiler Description for the Code :CS4021 The CallerFilePathAttribute may only be applied to parameters with default values