using System.Collections.Generic;
using System.Data.SqlClient;
public int Value1 {get; set;}
public int Value2 {get; set;}
public int Value3 {get; set;}
public int Value4 {get; set;}
public string AnotherValue {get; set;}
public static void Main()
MyClass a = new MyClass()
.Where(x => x.PropertyType == typeof(int) )
.Select(x => Convert.ToInt32(x.GetValue(a))).Max(x=>x);
Console.WriteLine(result);