Tag: convert
How to convert an Integer to Octal string in C# ?
You can easily format an integer to an octal string in C# using the Convert.ToString method. Below is a sample sourcecode that demonstrates How to convert an Integer to Octal string in C# ?
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 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.
Convert or cast integer to double in C#
Below is a code snippet to demonstrate how to Convert or cast integer to double in C#
How to Convert Decimal number to hex in JavaScript?
Below is a sample soucrecode snippet demonstrating the conversion of decimal number to hexadecimal in JavaScript. How to Convert Decimal number to hex in JavaScript?
How to convert an Integer to Hexadecimal string in C# ?
You can easily format an integer to an Hexadecimal string in C# using the ToString() method. How to convert an Integer to Hexadecimal string in C# ? Below is a sample sourcecode that demonstrates How to convert an Integer to Hexadecimal string in C# ?
How to convert string to Int32 using System.Convert in C#?
Below is a sample code snippet demonstrating How to convert string to ToInt32 using System.Convert in C#
How to convert Ascii value to character in C# ?
In C# , you can convert the Ascii value to its corresponding character by assigning the value to a character . How to convert Ascii value to character in C# ? Below is a sample sourcecode to demo how to convert Ascii value to character in C#
How to Convert Decimal to byte array in C# ?
Below is a sample sourcecode that demonstrates how to Convert DEcimal to byte array in C#
Top Tools to Convert HTML to PDF in .NET
There are times when you may want to generate PDF from the simple HTML data . There are plenty of tools available that lets the developers to easily convert HTML to PDF in .NET . Below are some of the well known tools to perform the task. Top Tools to Convert HTML to PDF in .NET wkhtmltopdf A simple shell utility tool that lets the…
How to Convert Byte Array to String in C#?
Below is a sample code snippet demonstrating the conversion of Byte Array to string in C#. How to Convert Byte Array to String in C#?
Convert or cast integer to character in C#
Below is a sample sourecode demonstrating how to convert or cast int to char in C# Convert or cast integer to character in C#
How to Convert DBContext Object to ObjectContext in C# ?
Below is a function that converts the DBContext object to ObjectContext in C#. How to Convert DBContext Object to ObjectContext in C# ?
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…
How to Convert a Byte Array to Integer in C# ?
To Convert a Byte array back to the integer , the developers can use the BitConverter.ToInt32 method which accepts byte array as input and returns the number . Below is a sample code snippet that demonstrates how to convert a byte array to integer in C#. How to Convert a Byte Array to Integer in C# ?
How to Convert Byte[] to stream in C# ?
Below is a sample code snippet demonstrating the conversion of the byte array to stream in C#. How to Convert Byte[] to stream in C# ?
How to convert a string to integer in C# ?
You can convert a string to integer in C# using the following functions 1. Int32.Parse / int.Parse 2. Convert.ToInt32 3. Int.TryParse() How to convert a string to integer in C# ? Below is a sample sourcecode demonstrating the usage of the above functions The advantage of using the int.tryparse is that when the string (str) in the above example is a invalid number , a…
How to Convert a Stream to Byte Array in C# 4.0 ?
One of the simplest way to convert a stream to byte array in C# 4.0 is to use the MemoryStream and perform the CopyTo operation on the source stream to the Memory Stream. How to Convert a Stream to Byte Array in C# 4.0 ? Below is a sample code snippet on how to convert a stream to byte array in C# 4.0.