Category: C#
C# Compiler Error – CS8914 a global using directive cannot be used
In this blog post, you’ll learn more about the C# Compiler Error – CS8914 and the related message description C# Compiler Error Code CS8914 C# Compiler Description for the Code :CS8914 A global using directive cannot be used in a namespace declaration.
How to Convert Integer to Hexadecimal number in C# ?
Below is a sample sourecode demonstrating the conversion of the integer value to Hexadecimal number in c# with just one line of code. How to Convert Integer to Hexadecimal number in C# ?
Using Modulus or % to get the Remainder in C#
Below is a sample soucrecode demonstrating how to get remainder in c# using Modulus or Remainder operator (%). Using Modulus or % to get the Remainder in C#
C# Compiler Error – CS1674 ‘{0}’: type used in a using statement mu
In this blog post, you’ll learn more about the C# Compiler Error – CS1674 and the related message description C# Compiler Error Code CS1674 C# Compiler Description for the Code :CS1674 ‘{0}’: type used in a using statement must be implicitly convertible to ‘System.IDisposable’.
How to Call Other Constructors within the Same Class in C# ?
There are times when you want to avoid duplicating code and want to reuse them when working on multiple constructors . If you want to call other constructors from a constructor within the same class , you need to use the this keyword . How to Call Other Constructors within the Same Class in C# ? Below is a sample code snippet that demonstrates how…
What does DDD stands for in Software Development ?
Most of the developers would have come across the term called “DDD” at some point of time in their career. What does DDD stands for in Software Development ? DDD stands for Domain Driven Development.
C# Compiler Error – CS4004 cannot await in an unsafe context
In this blog post, you’ll learn more about the C# Compiler Error – CS4004 and the related message description C# Compiler Error Code CS4004 C# Compiler Description for the Code :CS4004 Cannot await in an unsafe context
C# Compiler Error – CS7026 assembly and module attributes are not a
In this blog post, you’ll learn more about the C# Compiler Error – CS7026 and the related message description C# Compiler Error Code CS7026 C# Compiler Description for the Code :CS7026 Assembly and module attributes are not allowed in this context
Verbatim String Literals in C#
C# supports Verbatim String literals which begin with @ followed by the string data and doesn’t have a escape sequences within the string. This might be specially useful when you want to represent the file path . Below is a representation of Verbatim String Literals in C#
What are the Different Tile templates in Windows Phone 8?
The Windows Phone 8 SDK provides the developers with the option to use one of the below tile templates in their windows phone 8 app. 1. TemplateFlip 2. TemplateCycle 3. TemplateIconic What are the Different Tile templates in Windows Phone 8? The TemplateFlip provides the developers to display information in the front and the back side of the tile where the tile flips front and…
How to provide a default value for Auto Implemented Property in C#?
Sometimes, one might want to provide a default value for the auto implemented properties. For example, you might want to provide a default text for a string value instead of null. This can be achieved by providing the default value in the constructor for the properties. Below is a sample code snippet demonstrating how to do it. How to provide a default value for Auto Implemented…
How to Split a String on newlines in C#?
Ever wanted to split an input string in to new lines in .NET (c#) that has a new line character? Below is a sample code snippet that demonstrates how to do it. How to Split a String on newlines in C#?
Example of Predicate Delegate in C#
Predicate Delegate is an interesting feature in .NET Framework which is like a reference to a function which returns either true or false. Example of Predicate Delegate in C# Below is a sample code snippet demonstrating the usage of Predicate Delegate in C#
C# Compiler Error – CS8192 provided language version is unsupported
In this blog post, you’ll learn more about the C# Compiler Error – CS8192 and the related message description C# Compiler Error Code CS8192 C# Compiler Description for the Code :CS8192 Provided language version is unsupported or invalid: ‘{0}’.
How to Detect the Current device in Universal App ?
To detect the current device platform in the Windows Universal App , the developers can use the predefined ifdirectives WINDOWS_PHONE_APP and WINDOWS_APP . How to Detect the Current device in Universal App ? Eg : #if WINDOWS_PHONE_APP // wp8.1 #elseif WINDOWS_APP // windows 8.1 #endif
C# Compiler Error – CS0201 only assignment, call, increment, decrem
In this blog post, you’ll learn more about the C# Compiler Error – CS0201 and the related message description C# Compiler Error Code CS0201 C# Compiler Description for the Code :CS0201 Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
How to Download Map in Windows Phone 8 Programatically using C#?
The Windows Phone 8 SDK provides the MapDownloadTask which lets the users to download the region map which can be used for offline usage. This will launch the Map Download App which lets the users to select the map which needs to be downloaded. How to Download Map in Windows Phone 8 Programatically using C#? Below is a sample code snippet demonstrating how the user…
C# Compiler Error – CS0104 ‘{0}’ is an ambiguous reference between
In this blog post, you’ll learn more about the C# Compiler Error – CS0104 and the related message description C# Compiler Error Code CS0104 C# Compiler Description for the Code :CS0104 ‘{0}’ is an ambiguous reference between ‘{1}’ and ‘{2}’
Launching the Wifi Settings App using URI Scheme in Windows Phone 8
Below is a sample code snippet demonstrating on how to launch the Wifi Settings App via the URI Scheme and LaunchUriAsync method in Windows Phone using C#. Launching the Wifi Settings App using URI Scheme in Windows Phone 8
C# Compiler Error – CS1979 query expressions over source type ‘dyna
In this blog post, you’ll learn more about the C# Compiler Error – CS1979 and the related message description C# Compiler Error Code CS1979 C# Compiler Description for the Code :CS1979 Query expressions over source type ‘dynamic’ or with a join sequence of type ‘dynamic’ are not allowed