ero
ero
CC#
Created by Faker on 1/18/2025 in #help
Casting and Convert method in C#
but at this point we're arguing semantics really
61 replies
CC#
Created by Faker on 1/18/2025 in #help
Casting and Convert method in C#
it's still a type of conversion
61 replies
CC#
Created by Faker on 1/18/2025 in #help
Casting and Convert method in C#
no matter what kind of cast, a conversion always happens
61 replies
CC#
Created by Faker on 1/18/2025 in #help
Casting and Convert method in C#
i was trying to add something complementary to this statement, which i don't really agree with, but wanted to make sense of it for you
61 replies
CC#
Created by Faker on 1/18/2025 in #help
Casting and Convert method in C#
this implicitly casts i to double
61 replies
CC#
Created by Faker on 1/18/2025 in #help
Casting and Convert method in C#
yeah i'd say implicit casts (int to double) shouldn't convert. explicit casts (double to int) can mean that conversion and therefore loss of data occurs.
61 replies
CC#
Created by Faker on 1/18/2025 in #help
Casting and Convert method in C#
You can cast any struct type as well, which would be neither of your cases
61 replies
CC#
Created by Faker on 1/18/2025 in #help
Casting and Convert method in C#
Not even that
61 replies
CC#
Created by Faker on 1/18/2025 in #help
Casting and Convert method in C#
They don't have to be specifically about integers or strings
61 replies
CC#
Created by Faker on 1/18/2025 in #help
Casting and Convert method in C#
More generally, casting means converting from one type to another. The types must be compatible in some way, maybe through inheritance or because an implicit or explicit conversion operator is defined on the types. Parsing means interpreting some input so that it can become another type entirely, even if the two types were never compatible to begin with.
61 replies
CC#
Created by Faker on 1/18/2025 in #help
Casting and Convert method in C#
$tryparse
61 replies
CC#
Created by Faker on 1/18/2025 in #help
Casting and Convert method in C#
What you wrote there is not valid
61 replies
CC#
Created by Gasper 1.0 on 1/17/2025 in #help
why is my code weird??
in any case you can ask in $unity, which will likely be more helpful
26 replies
CC#
Created by Gasper 1.0 on 1/17/2025 in #help
why is my code weird??
hm. last thing that comes to mind is the things you have checked here. this page shows more things selected, but i won't blindly recommend you check random things without knowing what they do
26 replies
CC#
Created by Gasper 1.0 on 1/17/2025 in #help
why is my code weird??
what it says. open the visual studio installer and modify your vs 2022 installation
26 replies
CC#
Created by Gasper 1.0 on 1/17/2025 in #help
why is my code weird??
have you tried restarting both apps?
26 replies
CC#
Created by Gasper 1.0 on 1/17/2025 in #help
why is my code weird??
have you installed the necessary unity workloads in vs?
26 replies
CC#
Created by Gasper 1.0 on 1/17/2025 in #help
why is my code weird??
you haven't set up unity to recognize visual studio as your editor
26 replies
CC#
Created by madmike on 1/17/2025 in #help
Add NuGet package to shared library not possible (Rider)
But makes a lot of sense why they can't reference nuget packages then
13 replies
CC#
Created by madmike on 1/17/2025 in #help
Add NuGet package to shared library not possible (Rider)
Wow yeah I've never heard of that
13 replies