An integer will never be a string. Originally you create an integer variable so it's telling you the string case is pointless.
this post was submitted on 04 Jul 2023
5 points (100.0% liked)
.NET
1470 readers
17 users here now
Getting started
Useful resources
IDEs and code editors
- Visual Studio (Windows/Mac)
- Rider (Windows/Mac/Linux)
- Visual Studio Code (Windows/Mac/Linux)
Tools
Rules
- Rule 1: Follow Lemmy rules
- Rule 2: Be excellent to each other, no hostility towards users for any reason
- Rule 3: No spam of tools/companies/advertisements
Related communities
Wikipedia pages
- .NET (open source & cross platform)
- .NET Framework (proprietary & Windows-only)
founded 1 year ago
MODERATORS
Your code does not follow the pattern matching syntax; I don't see "is" anywhere. That's what is actually doing the casting
Edit: I think I'm completely wrong about "is" being required
view more: next ›