Music in my wpf project?
This code is by chatGPT, bc I don't know how to do it. but rider doesn't seem to recognise the 'player' variable. Also I get a unexpected Token error
7 Replies
well yeah you're trying to access a method inside a class and outside a method
I suggest u take a look at this tutorial https://learn.microsoft.com/en-us/shows/csharp-fundamentals-for-absolute-beginners/understanding-scope-and-accessibility-modifiers
so you can understand better about scope
so yeah there is no point using ChatGPT if u dont understand the language itself as u wont be able to tell right from wrong or sometimes where to place things
u should start with the basics and then move from there
I do know C#, I have coded the game already, but I have no Idea how to use the media lib
well the error is not about how to use the library is clearly about basic knowledge
This is what you're doing wrong right now
so I pointed u to a guide that explains how scope and variables work
ohh okay, I'll look into it. Sorry for talking before thinking haha
its all good 🙂 and sorry if I sounded rude pointing things directly
beyond that are you using winform, wpf or console app?
I guess WPF because OP asked "Music in my wpf project?" 😉
indeed missed the title, thx