C
C#•4mo ago
juzzi

Compiler Error CS1503 Help

Hello 😄 I am relatively new to Csharp and am working on a project which is supposed to generate checkboxes when it locates a client is open yada yada yada. I am using a different source as an example and even when copying 1:1 I get this error and am very confused on how to fix it! If you need more screenshots than what is listed to help narrow down the problem and help me at all I can gladly show more! lines 102-103 is the problem obviously 😄
No description
17 Replies
reflectronic
reflectronic•4mo ago
you are using .NET Framework, which means there is no such method you need to do content.Split(new[] { ", PID: " }, StringSplitOptions.None)
juzzi
juzziOP•4mo ago
🤔 thats where it confuses me even moreso i guess haha the source im learning off of and attempting to recreate is doing something similar. the image im attaching with this message Is there a viable replacement for this code relatively entirely then? Im unsure where to go from here. Sorry if I am being difficult just trying to figure it all out haha
No description
Pobiega
Pobiega•4mo ago
the video is probably using modern .NET while you made a legacy .NET Framework project
juzzi
juzziOP•4mo ago
Im assuming its because im build in .net4.8 and yes that would make sense lol
Pobiega
Pobiega•4mo ago
I would suggest you upgrade there is no reason to be on legacy these days
juzzi
juzziOP•4mo ago
I only used .net4.8 since its what I learned c# on in the first place years ago ive stuck with it first time ive encountered a problem haha
Pobiega
Pobiega•4mo ago
you're missing out on a ton of nice syntax changes, modern packages and huge performance changes and lack of support. .NET Framework became legacy in 2016, so its... uh.. a bit outdated
juzzi
juzziOP•4mo ago
😭
juzzi
juzziOP•4mo ago
No description
juzzi
juzziOP•4mo ago
upgrading now
Pobiega
Pobiega•4mo ago
that thing works okay, most of the time you might get some small issues, but shouldnt be much
juzzi
juzziOP•4mo ago
Yeah that should be fine aslong as i dont have to completely rewrite what ive been working on the past couple weeks haha
Pobiega
Pobiega•4mo ago
no guarantees take a backup first git would be a good idea, if you are not already using it
juzzi
juzziOP•4mo ago
Should I bother going to .net 9?
No description
juzzi
juzziOP•4mo ago
i am 😄
Pobiega
Pobiega•4mo ago
8 is fine upgrading to 9 in november will just be a single line change in the .csproj file 🙂
juzzi
juzziOP•4mo ago
gotcha 😄 testing stuff now 😄
Want results from more Discord servers?
Add your server