Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
AppDomain.CurrentDomain.UnhandledException += (_, e) => Environment.FailFast("", e.ExceptionObject as Exception);
void MyFunc(string func, params object[] args) { var argTypes = Type.GetTypeArray(args); var methodInfo = this.GetType().GetMethod(func, argTypes); methodInfo.Invoke(this, args); } ... MyFunc("M2", 5, "строка");
... if (reader.Read()) { Response.Write(reader["id"]); Response.Write(reader["level"]); } var ok = reader.NextResult(); // <--- if( !ok ) return; if (reader.Read()) { Response.Write(reader["lid"]); Response.Write(reader["sublid"]); } ...