C
C#2y ago
Lewis C

❔ Reusing strings across classes

This is file 1 https://cdn.discordapp.com/attachments/987310138195054592/1067462232860004433/image0.jpg I’d like to store and using the string content in other classes Like this https://cdn.discordapp.com/attachments/987310138195054592/1067462409738010634/image0.jpg But I have the red line of doom. What am I doing wrong
7 Replies
TheRanger
TheRanger2y ago
what does the error message say
Angius
Angius2y ago
OneFileAuth doesn't have any content Not a field Not a property Not a method
TheRanger
TheRanger2y ago
it could be non static too
Lewis C
Lewis COP2y ago
Do I need to store the string another way It doesn’t contain a definition for “content”
Angius
Angius2y ago
Because it doesn't content is a local variable inside of your Main method
Lewis C
Lewis COP2y ago
Ah so it suggested adding “internal static string content” above the main
Accord
Accord2y 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