© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
4 replies
00tree00

Unable to cast object of type - tried to explicit conversion operator

I have encountered a problem in my game launcher, namely when assigning e.UserState I get an error "Unable to cast object of type 'GameLauncher.Changes' to type 'GameLauncher.Version', I have read that I need to create an explicit conversion operator from Version to Changes, unfortunately I don't know how to go about this, could someone help or direct me with this?

below my two structures

to Version I take from the page and modify values, for example: 1.5.2

to Changes I download from the site and modify the values of the directories to be downloaded from the server, for example:

- data
- modules
- images

mechanisms for downloading and modifying work correctly, unfortunately, the error is in the following lines marked on the screenshot
APkA8.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

InvalidCastException: Unable to cast object of type
C#CC# / help
13mo ago
✅ Unable to cast object of type 'System.String' to type 'System.Int32'.
C#CC# / help
2y ago
❔ conversion operator
C#CC# / help
3y ago