//Cast the value-string to the proper type and assign it private void assignVal(HookObj hookobj, string value) { try { if (hookobj.theType == typeof(string)) { hookobj.SetValue(value); } else if (hookobj.theType == typeof(int)) { hookobj.SetValue(Int32.Parse(value)); } else if (hookobj.theType == typeof(float)) { hookobj.SetValue(float.Parse(value)); } else { throw new NotImplementedException(); } } catch (RuntimeBinderException ex) { throw new NotImplementedException("", ex); } catch (System.FormatException ex) { throw new NotImplementedException("", ex); } }
//Cast the value-string to the proper type and assign it private void assignVal(HookObj hookobj, string value) { hookobj.SetValue(value); }