public static Nullable <int> GetIntNullable(SetPropertyEventArgs args) { if (args == null) { throw new ArgumentNullException("args"); } SetIntPropertyEventArgs intAgrs = args as SetIntPropertyEventArgs; if (intAgrs == null) { throw new ArgumentException("Parameter args type " + args.GetType().FullName + " is not " + typeof(SetIntPropertyEventArgs)); } return(intAgrs.NewValue); }
public static string GetString(SetPropertyEventArgs args) { if (args == null) { throw new ArgumentNullException("args"); } SetStringPropertyEventArgs stringArgs = args as SetStringPropertyEventArgs; if (stringArgs == null) { throw new ArgumentException("Parameter args type " + args.GetType().FullName + " is not " + typeof(SetStringPropertyEventArgs)); } return(stringArgs.NewValue); }