Stop and Start Service using C# ServiceController class

To programmatically start and stop a service that your application interacts with, you need to use the System.ServiceProcess.ServiceController class. ServiceController […]

Updated on     Kisan Patel

Converting Between Degrees and Radians in C#

To convert a value in degrees to radians, multiply it by math.PI/180: public static double ConvertDegreesToRadians (double degrees) { return […]

Updated on     Kisan Patel

Convert Base10 Number to any Base in C#

To convert a number to its equivalent string representation in a specified base, you need to use Convert.ToString method as […]

Updated on     Kisan Patel

Converting Number in Another Base to Base10 in C#

To convert a number in another base to base10, you need to use the static Convert.ToInt32 method as shown in […]

Updated on     Kisan Patel

How to Check if string is valid Number in C#?

Use the static TryParse method of any of the numeric types. For example, to determine whether a string contains a […]

Updated on     Kisan Patel

How to add Data annotation validation in ASP.NET MVC

First of all You need to know which namespace or Reference is for DataAnnotation validation in MVC : using System.ComponentModel.DataAnnotations; […]

Updated on     Kisan Patel

Rounding Floating-Point Value in C#

To round any number to its nearest whole number, you need to use static Math.Round method as shown in below […]

Updated on     Kisan Patel

Get Integral Part of Decimal in C#

To find the integer portion of a decimal or double number, you need to use System.Math.Truncate(Decimal or Double value) method […]

Updated on     Kisan Patel

Disable Browser Back Button Using JavaScript

Just add the below code in the head section of the html page. <script type=”text/javascript”> window.onunload=function(){ window.history.forward(); }; </script> The […]

Updated on     Kisan Patel

Visual studio 2015 basic Requirements

All Hardware requirements 1.6 GHZ or More Minimum 1GB RAM (If You are using virtual machine then 1.5 GB ) […]

Updated on     Kisan Patel