Tag: How to

How to Get the File Version of the Assembly in .NET (C#)?

The developers can use the methods and properties available in the FileVersionInfo class to retrieve the File Version of the Assembly in .NET (C#). How to Get the File Version of the Assembly in .NET (C#)? Below is a sample code snippet demonstrating how to retrieve it.

How to shutdown or reboot Windows machine from command line in Windows 10 ?

You can reboot a windows machine or shutdown it from the command line in Windows 10 using some of the built-in commands. How to shutdown or reboot Windows machine from command line in Windows 10 ? To shutdown the windows machine , we can use the following command. shutdown /s Similarly , you can reboot or restart the windows machine using the following command shutdown…

How to Validate a Social Security Number using Regex in C# ?

If you need to validate a social security number in C# , the regular expressions is one of the easy wat to do it . Below is a sample code snippet demonstrating how to validate a social security number using regular expression . The pattern for matching it is that SSN number contains nine digits grouped with hypen as option. How to Validate a Social…

How to copy array and increase size dynamically in Java ?

Below is a sample code snippet in Java demonstrating the steps to copy the array elements to a new array and increase the size dynamically. The program using the Arrays.copyOf method which lets the developers to create new array with a new size as well as copy the content of the old array to it at the same time. How to copy array and increase…

How to rename a column in SQL Server ?

One of the options for the user to rename a column in SQL Server is using the so_rename stored procedure and specifying the parameters. Here’s the syntax of the sp_rename. For example , if you want to rename the column description in the temp_abundantcode table to comment , this is how it looks.

C Program to find the ASCII Value of a Character

Problem Write a program in C to find the Ascii value of a character entered by the user and display the result on the screen. How to find the ASCII Value of a Character in C ? When the user enters the character A , the value 65 (Ascii value) should be displayed on the screen. Here’s a C program for it. Output Enter a…

C Program to display Positive factors of a number

Problem Write a program in C to display all the positive factors of a number enter by the user. How to find and display positive factors of a number in C ? Below is a program in C demonstrating how to do it. Output Abundantcode.com coding sample Enter a Number :5 Positive factors of the number 5 are below: 1 5

How to Convert a Number to Bytes Array in C# ?

To Convert a number to a byte array , the developers can use the BitConverter.GetBytes method which returns array of bytes. How to Convert a Number to Bytes Array in C# ? Below is a sample code snippet demonstrating how to convert a Number to Byte Array in C# .

How to Check for NULL value in a Query in SQL Server ?

You might want to check if a column contains a NULL value or NOT and filter the rows. You can use the IS NULL and IS NOT NULL keywords in SQL Server to perform the NULL check. How to Check for NULL value in a Query in SQL Server ? The NULL values cannot be easily identified using the = operator because the NULL refers…

How to Copy a Song to Windows Phone Music Hub/Library using C#?

Below is a sample code snippet that demonstrates how to copy a song (audio) to the Windows Phone hub/library Programatically using C#. How to Copy a Song to Windows Phone Music Hub/Library using C#? The SaveFileToIsolatedStorage is explained in the How to Save File to Isolated Storage in Windows Phone 8? Article

C Program to display inverted full pyramid using *

Problem Write a program in C to print inverted full pyramid using * as shown below.The program should take the number of rows as input. * * * * * * *     * * * * *       * * *         * How to create and display inverted full pyramid using * ? Output Abundantcode.com Coding samples Enter number of rows: 4 *…

C Program to find if a character is a Vowel or Consonant

Problem Write a program in C to check whether a given character is a vowel or consonant. How to check if a character is a vowel or consonant in C Language ? In English , the alphabets A, E, I, O and U are vowels and the rest of the characters are consonants. Here’s a program that takes an input character from the user and…

C Program to Multiply two Floating Point Numbers

Problem Write a program in C to multiply two floating point numbers and then display the output on the console window. C Program to Multiply two Floating Point Numbers Output Enter two numbers: 6 7                                                                                                                                                        Product = 42.00

C Program to display Inverted half-pyramid using *

Problem Write a program in C to print Inverted half-pyramid using * as shown below.The program should take the number of rows as input. * * * * * * * * * * How to create and display Inverted half-pyramid pattern in C using * ? Output Abundantcode.com Coding samples Enter the limit : 4 * * * * * * * * *          …

Initialize int array in C# ?

Here’s a code snippet demonstrating how to initialize int arrays in C# and display the contents of it using the for loop. How to Initialize int array in C# ?