### C# -> X# Conversion syntax question... Method x<T>....WHERE...

Posted:

**Wed May 23, 2018 10:19 am**Hi All,

I've a short syntax question: How can I translate this extension method in X#?

Thank you !

Guy Deprez

public static bool IsBetween<T>(this T value, T min, T max) where T:IComparable<T>

{

return (min.CompareTo(value) <= 0) && (value.CompareTo(max) <= 0);

}

I've a short syntax question: How can I translate this extension method in X#?

Thank you !

Guy Deprez

public static bool IsBetween<T>(this T value, T min, T max) where T:IComparable<T>

{

return (min.CompareTo(value) <= 0) && (value.CompareTo(max) <= 0);

}