Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

8.1.2.0 and C# 8 features: Recursive Pattern Matching

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

    8.1.2.0 and C# 8 features: Recursive Pattern Matching

    Simple way like this works fine:
    PHP Code:
    int x = 5;
    if (x is int v)
    {
    } 
    

    More complex form like do compile but causing problems in formatting and false syntax error warnings:
    PHP Code:
    object o = "";
    if (o is string { Length: 5 } s)
    {
    }​ 
    
    This is what NS Editor shows right after a compilation.
    (In more complex scripts regions formatting become totally corrupted. Error highlighting appearing in dozens of places.)

    Click image for larger version

Name:	image.png
Views:	121
Size:	177.7 KB
ID:	1278662

    And here are false warnings if I'll type any symbols (including innocent SPACE) anywhere:

    Click image for larger version

Name:	image.png
Views:	105
Size:	179.7 KB
ID:	1278663
    fx.practic
    NinjaTrader Ecosystem Vendor - fx.practic

    #2
    Hello fx.practic,

    Thanks for your post.

    I was able to recreate this behavior on my end.

    We are researching this matter further to provide you with the best information possible.

    Once we are finished investigating this behavior we will update this forum thread with more information.

    Thanks for your patience.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Hello fx.practic,

      Thanks for your patience.

      I have reported this behavior to the Development team so they may investigate this matter further. The ID for this reported behavior is NT-11393.

      Once the Development team has finished investigating this and reports back I will update this forum thread with their findings.

      Thanks for reporting this!
      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

      Comment


        #4
        Thank you, glad to hear this!
        fx.practic
        NinjaTrader Ecosystem Vendor - fx.practic

        Comment


          #5
          Hello fx.practic,

          Thanks for your patience.

          Our Development team has informed me that a fix for this will be implemented. We do not have an estimated time for when the fix will be implemented.

          In the meantime, you will need to work around the issue for by either not using that type of code, or ignoring the error marks that appear until you recompile.
          <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          119 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          62 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          40 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          44 views
          0 likes
          Last Post TheRealMorford  
          Started by Mindset, 02-28-2026, 06:16 AM
          0 responses
          82 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X