Category: C#

Grammars available for Speech Apps in Windows Phone SDK

When implementing the speech recognition in the windows phone apps, we should use the predefined grammars to identify if the input is valid or not. There are generally 3 different types of grammars that can be used when implementing speech feature in your Windows Phone app. Grammars available for Speech Apps in Windows Phone SDK Built-In grammars – There are 2 types of built in…

How to disable editing of items in a combo box in c#?

When working in Win forms using C# and especially when you use the combo box , you would have noticed that by default the user can edit the values inside during the runtime. How to disable editing of items in a combo box in c# (win forms) ? Assuming that the combobox name is combobox1 , here the code to get this behavior.

How to Check if the Enum Value is Defined in C# ?

There are times when it is necessary to check if the constant name or numeric value is defined in the Enum . We can use the Enum.IsDefined method to verify this. How to Check if the Enum Value is Defined in C# ? Below is a sample code to demonstrate how to Check if the Enum Value is Defined in C# using Enum.IsDefined method. The…

How to Save File to Isolated Storage in Windows Phone 8?

There are times when you want to copy the files to isolated storage in your Windows Phone 8 App which you can do it easily using C#. Below is a sample code snippet that demonstrates the copying of file to isolated storage in Windows Phone 8 using C#? How to Save File to Isolated Storage in Windows Phone 8? Calling the function Note: make sure…

C# and LINQ – Filter elements from object collection with Logical Operators

Here’s a sample code snippet demonstrating how to filter elements from a list of objects using the where clause using LINQ in C#. This sample gets all the employees who salary is greater than 20000 GBP and age is greater than 22. How to Filter Employees List whose salary is greater than 20000 GBP and age is greater than 22 using LINQ in C# ?…