Tag: How to

VB.NET Program to add two integers

Problem Write a program in VB.NET to add two integers and display the result on the screen. VB.NET Program to add two integers Output Enter the first number : 1 Enter the second number : 2 The sum of two numbers is:3

How to Check if a login exists in SQL Server ?

If you need to check if a login exists in SQL Server , you can use query the master.dbo.syslogins for it. How to Check if a login exists in SQL Server ? Here’s a sample query demonstrating how you can query master.dbo.syslogins to find out if the login exists in SQL Server. This would retreive all the details of the loginid ‘sa’.

How to return Http Status Code from ASP.NET Web API Controller ?

There are times when you might want to return the Http Status code from an action method of a ASP.NET Web Api Controller. One of the simplest way of doing this is using the CreateResponse method of the HttpRequestMessage as shown below. The sample below demonstrates how to return the status code 304 and 200 based on the last modified date of the employee record….

C Program to count the number of digits in an Integer

Problem Write a program in C to cound the number of digits in an integer that was entered by the user. How to count the number of digits in an integer in turbo C ? Output Abundantcode.com Coding sample                                                   Enter an integer: 50102                                                Number of digits: 5

How to Not Allow Windows Phone devices to install App which don’t meet Requirements ?

There are times when you want to disable or not allows the Windows Phone devices to install the WP8 app that doesn’t meet the specific hardware requirements . How to Not Allow Windows Phone devices to install App which don’t meet Requirements ? You can do it by setting the requirements in the WMAppManifest.xml file. The Windows Phone Application manifest file includes a tab called…

How to delete folder from command line in Windows 10 ?

You can delete a directory or folder using the command “rmdir” from commandline in Windows 10. How to delete folder from command line in Windows 10 ? The syntax for deleting the folder in windows 10 is rmdir <name of the directory> Incase you want to delete the non-empty folder , you can use the parameter /s for the rmdir command. Below is an example…

How to Create an Interface in C# ?

You might need to few functionalities without defining any implementation of the abstract methods. This should later be applied to various types within your project. In this case , one can create an interface which specifies some behavior rather than what the type or member is all about. How to Create an Interface in C# ? Below is a sample interface called IMusic The interface…

C# Program to add two integers

Problem Write a program in C# to add two integers and display the result on the screen. C# Program to add two integers Output Enter the first number1 Enter the second number2 result 3

How to Throw an Exception in C# ?

To indicate and error which can be handled by the caller function , you can use the throw keyword to throw an exception . For example , below is a sample code snippet demonstrating how to throw an exception in C#. How to Throw an Exception in C# ?

How to create a file from a Command line in Windows 10 ?

There are two command that you can use to create a file from a command line in Windows 10. These include – echo – fsutil How to create a file from a Command line in Windows 10 ? The fsutil command can be used to create a file  by specifying the size but if you need to write a data to the file during its…