Multiply it by four, round it as you need to an integer, then divide it by four again:

```
x = Math.Round (x * 4, MidpointRounding.ToEven) / 4;
```

The various options for rounding, and their explanations, can be found in this excellent answer here ðŸ™‚

### Related Contents:

- How do you round a number to two decimal places in C#?
- Rounding down to 2 decimal places in c#
- How to convert hex to decimal in c#.net? [duplicate]
- decimal vs double! – Which one should I use and when? [duplicate]
- How do I display a decimal value to 2 decimal places?
- How to convert numbers between hexadecimal and decimal
- Remove trailing zeros
- When should I use double instead of decimal?
- Decimal precision and scale in EF Code First
- Truncate Two decimal places without rounding
- Find number of decimal places in decimal value regardless of culture
- How can I round up the time to the nearest X minutes?
- How To Represent 0.1 In Floating Point Arithmetic And Decimal
- Formatting a float to 2 decimal places
- Is a double really unsuitable for money?
- Why can’t I unbox an int as a decimal?
- Round a double to x significant figures
- How to convert a Decimal to a Double in C#?
- Regular expression for decimal number
- What does the M stand for in C# Decimal literal notation?
- Best way to display decimal without trailing zeroes
- Built in .Net algorithm to round value to the nearest 10 interval
- Problem parsing currency text to decimal type
- Arbitrary-Precision Decimals in C# [duplicate]
- How do I convert a Decimal to a Double in C#?
- How to Round to the nearest whole number in C#
- How to convert Decimal to Double in C#?
- How to round up value C# to the nearest integer?
- Format decimal for percentage values?
- Convert string to decimal, keeping fractions
- Generating a Random Decimal in C#
- String to decimal conversion: dot separation instead of comma
- Conversion of a decimal to double number in C# results in a difference
- use decimal values as attribute params in c#?
- Performing Math operations on decimal datatype in C#?
- How do I convert a decimal to an int in C#?
- Why does integer division in C# return an integer and not a float?
- C# – Multiple generic types in one list
- Calling JavaScript Function From CodeBehind
- Associating enums with strings in C#
- How can I run an EXE file from my C# code?
- Get properties and values from unknown object
- Why use try {} finally {} with an empty try block?
- Executing tasks in parallel
- how to delay shutdown and run a process in window service
- Selenium: Drag and Drop from file system to WebDriver?
- Protect .NET code from reverse engineering?
- Open X509 Certificates Selection Using USB Token in C# Hosted on IIS
- DataGrid row content vertical alignment
- How to make a regex match case insensitive?