Category: C#

How to Check for Column Name in SqlDataReader object in C# ?

Do you want to check if a column exists in a SqlDataReader instance in C# ?. One of the simplest solution is to navigate to all the fields within the data reader and check the name of the field using the GetName method as shown below. How to Check for Column Name in SqlDataReader object in C# ?

How to Find if the User has tapped on the Screen in Windows Phone 8 App ?

There are times when you want to find out if the user has tapped on the screen to perform some action . For example , you are developing a game and want the user to tap anywhere on the screen to proceed . In these scenario , one can use the Touch.FrameReported event which lets you capture the position on the screen where the user…

How to get the Windows Phone 8 device resolution?

In Windows Phone 8, the developers can utilize the App.Current.Host.Content.ScaleFactor to get the Windows Phone 8 device resolution. How to get the Windows Phone 8 device resolution? Below is a sample code snippet demonstrating how to retrieve the Windows Phone 8 device resolution. The returning value of the ScaleFactor function is 100, 150, and 160 which refers to the resolutions WVGA, 720P, WXGA respectively.