Category: C#

How to sort an array in C# ?

If you want to sort an array in C#.NET , you can use the Array.Sort method to do it. How to sort an array in C# ? Below is a sample code snippet demonstrating the usage of the Array.Sort method to sort an array in C#.

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…

How to Convert a List to ObservableCollection in C#?

This simple blog post will explain how to convert a List of Object to ObservableCollection of Object in C# and Windows Phone 8. There are times when you want to convert a List of Object to ObservableCollection specially when binding an ObservableCollection to the LongListSelector etc. The reasons for this can be several. How to Convert a List to ObservableCollection in C#? To Convert a…