Tag: tips

What is Suspension Manager in Windows Phone 8.1 App template ?

When you create a new Windows Phone 8.1 project using the Hub App or Pivot App template , you would notice that it contains a class called “SuspensionManager”. What is Suspension Manager in Windows Phone 8.1 App template ? It is a kind of helper class and provides the necessary properties and methods to load and store the state when the windows phone store app…

How to open Documents folder from Run Window in Windows 10 ?

You can open the documents folder from the Run Windows in Windows 10 using the command “Documents”. How to open Documents folder from Run Window in Windows 10 ? Just open the Run window using the shortcut key (Windows + R) and type “Documents” and press the enter key. This should open up the documents folder or directory in Windows 10.

How to Create a Class in Javascript in WinJS ?

You can define a new class using WinJS.class.define when developing Windows Store App using Javascript. How to Create a Class in Javascript in WinJS ? The WinJS.Class.define method can be used to create a new class in WinJS  . It accepts 3 parameters – Constructor – instanceMembers – staticMembers Below is a sample code snippet demonstrating the usage WinJS.Class.define to create a new class in…

Auto-Property Initializers with Method Call in C# 6.0

The Auto-Property Initializer in C# 6.0 is a feature that lets the users to initialize the value of the auto implemented property . This feature lets the user provide any expression (lambda expression or a method) . Auto-Property Initializers with Method Call in C# 6.0 The below code snippet demonstrates how to initialize the auto property with a method call.

How to Turnoff Frame rate counter in UWP App ?

You can turn off the frame rate counter in your Universal Windows Platform (UAP) apps by following the below steps. How to Turnoff Frame rate counter in UWP App ? 1. Open your UWP project built using C# and XAML in Visual Studio. 2. From Visual Studio Solution explorer , open App.xaml.cs. 3. Set the DebugSettings.EnableFrameRateCounter property with the false false. as shown below.

How to remove the non ascii characters from a string in C# ?

Regular expression comes in handy especially if you want to remove the non ascii characters from a string in C#. Here’s a regular expression sample in C# demonstrating how to do it. How to remove the non ascii characters from a string in C# ? The output of the code snippet will be cde in C#

Column Alias in SQL Query

When returning the query results , you want to provide an alternate name for the column for readability purpose , you can use the AS clause to specify the column alias in SQL Query. How to specify Column alias in SQL Query ? Below is an example of the usage of the column alias in SQL Query. Every column in the Query result has a…

Exit the Current Scope with a return value in SQL Server

You can use the RETURN statement to discontinue the execution of a T-SQL batch statement or a stored procedure and provide a status code or value on return. For example , you want to display the Employees whose MaritalStatus is Divorced. You want to return a value -1 to indicate that no records exist and also You do not want the SQL Statements following it…

How to add new user account from command line in Windows 10 ?

You can add a new user account in Windows 10 using command prompt using the net user command and passing the right parameter. How to add new user account from command line in Windows 10 ? Following is the syntax of the command to add a new user from command line in Windows. net user <username> <password> /ADD For example , to add a new…

How to convert number to text in Excel?

In Microsoft Excel 2016 , there are times when you don’t want the numbers present in the cell to be participating in the calculation. This means , you can either update the formula to not include the cell value or else change the number to text. How to convert number to text in Microsoft Excel 2016? You can use the TEXT function in Excel to…

How to Detect Windows Phone OS version using C#?

The Windows Phone SDK provides the Environment.OSVersion property which can be used to detect the version of the Operating System uses in Windows Phone (Windows Phone 8 / Windows Phone 7). Below is a code snippet that demonstrates how to detect the Windows Phone OS Version using C#. How to Detect Windows Phone OS version using C#?

How to Check if all elements in array are alphabets in JavaScript ?

JavaScript provides the every() method defined in the Array object which lets the developers to check and validate the contents of the array in JavaScript. How to Check if all elements in array are alphabets in JavaScript ? Below is a sample code snippet demonstrating the usage of the every() method to find out if all the elements in the array are alphabets. Note that…