Category: C#

How to Parse a string to Nullable Int in C# ?

Below is a sample code snippet demonstrating how you can convert a string to Nnullable Int in C#. How to Parse a string to Nullable Int in C# ? We use the int.Parse and based on its return value , assign the null or integer value to the Nullable Int.

How to Get the Name of the Anonymous class(type) in C# ?

Below is a sample code snippet which gets the name of the anonymous class . In the below example , the Name and the ID property is set which is anonymous where the type is not specified. When trying to find out the type of the anonymous type , you will get the type as shown in the screenshot below. How to Get the Name…

C# Compiler Error – CS8384 tuple types used as operands of an == or

In this blog post, you’ll learn more about the C# Compiler Error – CS8384 and the related message description C# Compiler Error Code CS8384 C# Compiler Description for the Code :CS8384 Tuple types used as operands of an == or != operator must have matching cardinalities. But this operator has tuple types of cardinality {0} on the left and {1} on the right.

Alternate Method to Navigate from Page in Windows Phone 8 using C#

The NavigationService.Navigate method i.e. generally used to navigate from one page to another page in Windows Phone 8 SDK. The NavigationService also exposes a property “Source” which can be used to Get/Set the URI of the page . By Setting this property, the Application Frame loads the specified page. Alternate Method to Navigate from Page in Windows Phone 8 using C# Below is a sample…

Default Value of Row and Column attached properties in XAML

In the Windows Phone XAML page , when you place a control inside the grid column or row , you would have noticed that the sometimes the row and column value are not specified . This means that the row and column attached properties of the grid defaults to the value zero and hence its not mandatory to specify Grid.Column or Grid.Row to 0 when…