Vedrit
Vedrit
CC#
Created by Vedrit on 9/30/2023 in #help
✅ Questions about casting
Sorry, after putting my thoughts together, I've realized that this is a question better suited to the community for the network library I'm using. Thanks for trying, everyone.
11 replies
CC#
Created by Vedrit on 9/30/2023 in #help
✅ Questions about casting
It's not mine, it's part of a networking library. That's why I said I didn't know the details. I'll get a code example in a bit, just woke up.
11 replies
CC#
Created by Vedrit on 9/30/2023 in #help
✅ Questions about casting
I used dictionaries mainly for organization. The keys and values are read from the dictionary I don't know the details behind the deserialization, but to my understanding it's a byte array. You iterate through, telling it to cast the bytes as a specific type, then move to the next index. The counter is so that when I'm iterating through, I know exactly how many are of which type, and since they were written in groups, I can read them in groups. I guess, long story short, if I serialize an int, a string, and a float to a byte array, do I have to know the correct type when casting?
11 replies