# How to convert numbers into generic type?

This is how I would like to be able to write my code. MethodB is just a dummy here, all we care about is that it’s returning type T. public static class ClassA<T> where T: struct, INumber<T> { public static T MethodA( T[][] matrix, T[] vector) { T result = T.Zero; int m = matrix.Length;… Read More How to convert numbers into generic type?