# Convert an angle in Degrees to Radians in C#

To get radians for an angle in C# we created below method which takes the angle value as parameter and it will multiple the angle value by PI divided by 180, and finally we return the value.## Example

```
using System;
public class Example
{
public static double ConvertToRadians(double angle)
{
return (Math.PI / 180) * angle;
}
public static void Main()
{
double angle = 45;
double radianValue = ConvertToRadians(angle);
Console.WriteLine(radianValue);
}
}
```

### Output

0.785398163397448