Category: C#
How to Programatically Create ApplicationBar in Windows Phone ?
Are you looking to create ApplicationBar programmatically at runtime in Windows Phone ? . Below is a sample code snippet that demonstrates how to create Application Bar in Windows Phone 8 . How to Programatically Create ApplicationBar in Windows Phone ? Call this function in the constructor of the page after the InitializeComponent method.
C# Compiler Error – CS8050 only auto-implemented properties can hav
In this blog post, you’ll learn more about the C# Compiler Error – CS8050 and the related message description C# Compiler Error Code CS8050 C# Compiler Description for the Code :CS8050 Only auto-implemented properties can have initializers.
Comparing only Date in the DateTime datatype in C#
The DateTime datatype includes both the date as well as the time component to it in C#. By any chance , if you want to compare only the date part in the DateTime variable in C# , you can use the Date property defined in the DateTime class. How to compare only Date in the DateTime datatype in C# ?
C# Compiler Error – CS8925 the first operand of an overloaded shift
In this blog post, you’ll learn more about the C# Compiler Error – CS8925 and the related message description C# Compiler Error Code CS8925 C# Compiler Description for the Code :CS8925 The first operand of an overloaded shift operator must have the same type as the containing type or its type parameter constrained to it, and the type of the second operand must be int
How to generate C# classes from xsd file ?
You can easily generate the C# classes or entities from the xsd file using the VS Command Prompt. How to generate C# classes from xsd file ? Just launch the VS command prompt from the Windows 10 Start menu and run the following command xsd <Path of your.xsd file> /classes Eg : xsd “C:/test.xsd” /classes This would create the .cs files in the same folder…
C# Compiler Warning – CS1030 #warning: ‘{0}’
In this blog post, you’ll learn more about the C# Compiler Warning – CS1030 and the related message description C# Compiler Warning Code CS1030 C# Compiler Description for the Code :CS1030 #warning: ‘{0}’
C# Compiler Error – CS1948 the range variable ‘{0}’ cannot have the
In this blog post, you’ll learn more about the C# Compiler Error – CS1948 and the related message description C# Compiler Error Code CS1948 C# Compiler Description for the Code :CS1948 The range variable ‘{0}’ cannot have the same name as a method type parameter
C# Compiler Error – CS1007 property accessor already defined
In this blog post, you’ll learn more about the C# Compiler Error – CS1007 and the related message description C# Compiler Error Code CS1007 C# Compiler Description for the Code :CS1007 Property accessor already defined
C# Compiler Error – CS0456 type parameter ‘{1}’ has the ‘struct’ co
In this blog post, you’ll learn more about the C# Compiler Error – CS0456 and the related message description C# Compiler Error Code CS0456 C# Compiler Description for the Code :CS0456 Type parameter ‘{1}’ has the ‘struct’ constraint so ‘{1}’ cannot be used as a constraint for ‘{0}’
C# Compiler Warning – CS3017 you cannot specify the clscompliant attr
In this blog post, you’ll learn more about the C# Compiler Warning – CS3017 and the related message description C# Compiler Warning Code CS3017 C# Compiler Description for the Code :CS3017 You cannot specify the CLSCompliant attribute on a module that differs from the CLSCompliant attribute on the assembly
Converting an Enum to Integer in C#
If you need to convert an enum to its numeric equivalent , you can simply cast the values to integer . Below is a sample code snippet that demonstrates how to do it. Converting an Enum to Integer in C#
C# Compiler Error – CS0016 could not write to output file ‘{0}’ — ‘
In this blog post, you’ll learn more about the C# Compiler Error – CS0016 and the related message description C# Compiler Error Code CS0016 C# Compiler Description for the Code :CS0016 Could not write to output file ‘{0}’ — ‘{1}’