int value = 15; int clampedValue = Math.Clamp(value, 0, 10);In this example, the initial value of 15 is outside the specified range of 0 and 10, so the clamp function returns the value of 10. The Clamp function belongs to the System namespace and is a part of the System.Math class.