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 😄
17 Replies
you are using .NET Framework, which means there is no such method
you need to do
content.Split(new[] { ", PID: " }, StringSplitOptions.None)
🤔 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
the video is probably using modern .NET
while you made a legacy .NET Framework project
Im assuming its because im build in .net4.8 and yes
that would make sense lol
I would suggest you upgrade
there is no reason to be on legacy these days
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
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
ðŸ˜
upgrading now
that thing works okay, most of the time
you might get some small issues, but shouldnt be much
Yeah that should be fine aslong as i dont have to completely rewrite what ive been working on the past couple weeks haha
no guarantees
take a backup first
git would be a good idea, if you are not already using it
Should I bother going to .net 9?
i am 😄
8 is fine
upgrading to 9 in november will just be a single line change in the .csproj file 🙂
gotcha 😄
testing stuff now 😄