Tag: value
How to Sort dictionary by value in C#?
The Dictionary contains the KeyValuePair and the below is a sample code snippet that demonstrates the sorting of the dictionary entries by value in C#. How to Sort dictionary by value in C#?
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…
How to Get the Property value using reflection in C# ?
Below is a sample method that demonstrates how to retrieve the property value in C# using reflection. How to Get the Property value using reflection in C# ?
How to Round the Decimal Value to 2 Decimal Places in C# ?
If you want to round the decimal value to 2 decimal places , one can simply use the .ToString method by providing the format specifiers as shown below. How to Round the Decimal Value to 2 Decimal Places in C# ?
How to Get the Maximum value from a List of String using LINQ in C# ?
In one of the previous article , we explained how to get the maximum value from a list of integer using LINQ query in C# . What happens when the column is a string instead of integer ?. Below are 2 possibilities on how to get the maximum value from a list of string. How to Get the Maximum value from a List of String…
WP8 Error – Cannot clear the icon while in a list Parameter name: value
When using the ApplicationBar in the Windows Phone Application and dynamically setting the IconButtons from code behind , I encounter this error . Cannot clear the icon while in a list Parameter name: value The cause of the error and the fix is pretty straight forward . I was setting the IconUri of the ApplicationBarIcon button programmatically and the value of the IconUri was not…