public struct Vector3<T>
{
private T X { get; set; }
private T Y { get; set; }
private T Z { get; set; }
public Vector3(T x, T y, T z) : this()
{
this.X = x;
this.Y = y;
this.Z = z;
}
public static Vector3<T> operator +(Vector3<T> v1, Vector3<T> v2)
{
return new Vector3<int>(v1.X + v2.X, v1.Y + v2.Y, v1.Z + v2.Z);
}
}
Gives error: Cannot apply operator '+' to oparands of type 'T' and 'T'.
Please help resolve.