Get Type of data

Discussion and help for Easy Save 3
Post Reply
gozda
Posts: 45
Joined: Wed Jun 24, 2015 3:14 pm

Get Type of data

Post by gozda »

Hey,
how to get a type of data? i mean if this data is ttring, int32...
in es2 we have something like that

Code: Select all

for...
type = ES2.LoadObject(gameData.fileName + "?tag=" + tags[i], (new ES2Settings())).GetType().Name;
switch (type)
How can i get something similar in es3?
thanks
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Get Type of data

Post by Joel »

Hi there,

We now require all users to set the order/invoice number in their profile. Please could you do so using the instructions here so I can provide support:

https://moodkie.com/forum/viewtopic.php?t=3014

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
gozda
Posts: 45
Joined: Wed Jun 24, 2015 3:14 pm

Re: Get Type of data

Post by gozda »

done, bump
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Get Type of data

Post by Joel »

Thanks for doing that.

The equivalent in ES3 is to use the ES3.Load overload which doesn't have a generic parameter. I.e.

Code: Select all

System.Object obj = ES3.Load("key");
Or alternatively just set the generic parameter to System.Object:

Code: Select all

System.Object obj = ES3.Load<System.Object>("key");
All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply