How would I get this to work? Looking to have result updated with the 100 using generic typing. Any ideas? Of course this function isn't complete, I just need to get the result functionality working so I can continue.
public static bool ReadMemory<T>(Process process, IntPtr address, ref T result)
{
Type objType = result.GetType();
switch (objType.Name)
{
case "Int32":
result = (T)100;
return true;
default:
return false;
}
}