Пример #1
0
 /// <summary>Creates and a new instance of the <see cref="NativeConsole"/> class
 /// and optionally initializes it.</summary>
 /// <param name="initialize">Whether to initialize the console or not</param>
 public NativeConsole(bool initialize)
 {
     if (initialize)
     {
         try
         {
             Initialize();
         }
         catch (ConsoleInteropException cie)
         {
             _initializationException = cie;
         }
     }
 }
Пример #2
0
 /// <summary>Creates and a new instance of the <see cref="NativeConsole"/> class 
 /// and optionally initializes it.</summary>
 /// <param name="initialize">Whether to initialize the console or not</param>
 public NativeConsole( bool initialize )
 {
     if (initialize)
      {
     try
     {
        Initialize();
     }
     catch (ConsoleInteropException cie)
     {
        _initializationException = cie;
     }
      }
 }