5 Replies
i need help i ave error with bot.Ticket , NebulaProfile , Nebulatoken why
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 tupleok thx
var bot = BotList.FirstOrDefault();
if (bot != null)
{
CS_WM(bot.NebulaProfile, bot.NebulaToken, botTickets);
}
so i just change the line to this
No
Your
bot
is an unnamed tuple
It doesn't have .NebulaProfile
property
Read what I wrote againWas 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.