Can you add extension methods to a struct?
Yes, you can add extension methods on structs. As per the definition of extension method, you can easily achieve it. Below is example of extension method on int
namespace ExtensionMethods
{
public static class IntExtensions
{
public static bool IsGreaterEqualThan(this int i, int value)
{
return i >= value;
}
}
}