public void Compute <T>(T value) { foreach (var GetBytes in typeof(BitConverter).GetMethods()) { if (GetBytes.Name != "GetBytes") { continue; } if (GetBytes.GetParameters()[0].ParameterType != typeof(T)) { continue; } var bytes = GetBytes.Invoke(null, new object[] { value }) as byte[]; Compute(bytes); return; } throw new Exception("BitConverter Don't have GetBytes Instance that recive parameter with type " + typeof(T).FullName); }