Tag: How to
How to Format a Number for a Specific Culture in C# ?
Below is a sample code snippet demonstrating how to format the number for a specific culture in C# . In the below sample code , the german (de-DE) and US English Format is used. How to Format a Number for a Specific Culture in C# ?
How to Run a Windows Store App from Visual Studio 2013 ?
When you have created your Windows Store App , you can run it by pressing the “Run” button from Visual Studio toolbar or use the shortcut key “F5” to run the app. How to Run a Windows Store App from Visual Studio 2013 ?
How to Programatically Create ApplicationBar in Windows Phone ?
Are you looking to create ApplicationBar programmatically at runtime in Windows Phone ? . Below is a sample code snippet that demonstrates how to create Application Bar in Windows Phone 8 . How to Programatically Create ApplicationBar in Windows Phone ? Call this function in the constructor of the page after the InitializeComponent method.
How to Declare and Define an signed byte data type variable in F# ?
How to Declare and Define an signed byte data type variable in F# ?
Comparing only Date in the DateTime datatype in C#
The DateTime datatype includes both the date as well as the time component to it in C#. By any chance , if you want to compare only the date part in the DateTime variable in C# , you can use the Date property defined in the DateTime class. How to compare only Date in the DateTime datatype in C# ?
How to generate C# classes from xsd file ?
You can easily generate the C# classes or entities from the xsd file using the VS Command Prompt. How to generate C# classes from xsd file ? Just launch the VS command prompt from the Windows 10 Start menu and run the following command xsd <Path of your.xsd file> /classes Eg : xsd “C:/test.xsd” /classes This would create the .cs files in the same folder…
How to Display list of databases on a MySQL?
If you want to display the list of databases in a MySQL server, you can use the command ‘show databases’. How to Display list of databases on a MySQL?
Converting an Enum to Integer in C#
If you need to convert an enum to its numeric equivalent , you can simply cast the values to integer . Below is a sample code snippet that demonstrates how to do it. Converting an Enum to Integer in C#
How to Allow Null Values for Integer in C# ?
In order to allow null values to an integer or for any value types , we need to make the data type as Nullable<T> where T refers to type. How to Allow Null Values for Integer in C# ? There are 2 ways you can set null value to value types in C# .
Java – How to calculate of Power of a BigInteger Number ?
Problem Statement You need to calculate the power of a number of type BigInteger in Java. Solution Use the instance method “pow” of the type BigInteger by passing the exponent which will return the power as shown below. The output of the above program is 26665751846889541009
CASE expression in a Query in SQL Server
You can use the CASE expression in a T-SQL query in SQL Server to get the same behavior of the switch statement in the programming languages. Below is a sample Query demonstrating the implementation of the CASE expression in a query in SQL Server. CASE expression in a Query in SQL Server The query associates a Department group name to a country USA and UK…
How to convert Array to List in Java ?
This article will explain how to convert a simple array to list in Java . How to convert Array to List in Java ? The Java’s array class provides necessary methods to convert the array to the List using the asList method. Below is a sample code snippet demonstrating the usage of the Arrays.asList method to convert array to List.