❔ Need help with var

Hello
5 Replies
Professor Chen
Professor Chen17mo ago
i need help i ave error with bot.Ticket , NebulaProfile , Nebulatoken why
Angius
Angius17mo ago
BotList seems to be a list of tuples You deconstruct them inside of that foreach So... use the variables you deconstructed the tuples into Ah, wait, later on you're trying to access the elements outside of the foreach Well, in that case, those tuples aren't deconstructed And they're also unnamed, because you didn't name them So there's only .Item1, .Item2, .Item3 and .Item4 properties Not .Ticket, .NebulaProfile, and .NebulaToken Either: a) use .ItemX b) Use a named tuple c) PREFERABLY use a class or a record instead of a tuple
Professor Chen
Professor Chen17mo ago
ok thx var bot = BotList.FirstOrDefault(); if (bot != null) { CS_WM(bot.NebulaProfile, bot.NebulaToken, botTickets); } so i just change the line to this
Angius
Angius17mo ago
No Your bot is an unnamed tuple It doesn't have .NebulaProfile property Read what I wrote again
Accord
Accord17mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts
❔ Easy way to make a controller not visible in swagger uiHey guys this controller still in development so I would like to hide it out of swagger ui does ASP.❔ Question About ParticleEffects in Unity/C#So right now, im only a couple weeks into C#/GameDev. Im working on a tiny little project to try to ❔ Unity deltaTime errorthis is my code, when I multiply the damping by deltaTime it breaks the spring but without timeDeltaLINQ List A (list of strings) "partial" has any member of list B (list of strings)For instance: List A has "Car","Bicycle" List B has "Blue Car", "Red Baloon","Random stuff" I wan❔ How to get installed Extensions from Visual Studio installation?I am using the Powershell VSSetup module to get the list of installed VS instances. How do I get th❔ How to make changes to files using low spaceid like to know some way to for example modify a file by like a list of changes without need to down✅ Record for ensuring parametersHello. I'm currently learning Function C#, and the guy I'm currently making a demo for gave me a tip✅ Await seemingly ignored inside Dispatcher.BeginInvokeI'm writing an app in WPF. Currently testing something out, here's the code I'm testing: ```await D❔ dotnet start, and profilesWhen I run `dotnet run`, which profile from `launchSettings.json` is chosen? There are so many ways ❔ integrate an UI test with playwright on a Blazor ServerCan someone help me? I try to use this code to integrate an UI test with playwright on a blazor serv