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
3 Replies
in Version structure i will added
and in Changes structure
but still doesn't work
Here is url to function InstallGameFiles https://hastebin.com/share/ihopiguwut.java
wherever DownloadChangesCompletedCallback is used there UserState is passed
Hastebin
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
errors