Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What happened to System.Console.Write?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    What happened to System.Console.Write?

    I think that the C# instruction:

    System.Console.Write("The Wonderful World of C# Programming");

    should be included as part of:

    using System;

    The instruction compiles.

    If I open the NT Output window AND the normal DOS window, the instruction is executed but produces nothing on either window.

    So, where'd my Wonderful World go?

    Thanks,

    Larry

    PS: You will guess where I'm going with this so I might as well "included" the next question:

    Compileable console reads seem ignored as well:

    int Number;
    string strNumber;
    strNumber = Console.ReadLine();
    Number =
    int.Parse(strNumber);

    Where'd they go?

    Obvoiously, I want to control my strategy from the keyboard and not let it run on its own hook without the ability for higher lever direction.

    #2
    Larry, please use the Print command to write to the NinjaTrader output window, for more info on the Console Class please refer to MSDN - http://msdn.microsoft.com/en-us/libr...m.console.aspx

    While you should be able to achieve what you look for with C#, this is unfortunately beyond the scope what we support.

    Comment


      #3
      Good morning, Bertrand (or night to you),

      I can use the "print" command as easily. I was just trying to coorelate the System .Read and .Write methods to NT6.

      Let me try to phrase the questions in a supportable way:

      Does NT6 support the System.Console.Write C# instruction and where would the output appear?

      Does NT6 support the set of instructions:

      include System;
      int Number;string strNumber;
      strNumber = Console.ReadLine();
      Number = int.Parse(strNumber);

      If so, why does a

      Print (Number.ToString);

      not print a number typed on the keyboard?

      I hope that comes under the "supportable" clause. If not, I'll muddle on.

      Thanks,

      Larry

      Comment


        #4
        Larry, I'm sorry but this is unsupported - for capturing keystrokes with C#, you could review this - http://support.microsoft.com/kb/320584

        Comment


          #5
          Bertrand,

          Thanks anyway and for the advice! I'll follow the trail you started me on.

          Larry

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          637 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          366 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          107 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          569 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          572 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X