SpriteDatabaseLoadObjectFromXmlFileT Method |
Load in an XML serialized item from the specified ResourceManager. You will usually make one of these by
creating an object and using
WriteToXmlFileT(String, T) SpriteDatabase.WriteToXmlFile to
save it to a file on your desktop. Then you can drag and drop that file into your project and then use this
LoadObjectFromXmlFile function.
Namespace:
SpriteLibrary
Assembly:
SpriteLibrary (in SpriteLibrary.dll) Version: 1.0.0.6 (1.0.0.6)
Syntaxpublic static T LoadObjectFromXmlFile<T>(
string XMLResourceToLoad,
ResourceManager MyManager
)
where T : new()
Parameters
- XMLResourceToLoad
- Type: SystemString
The resource item to load. If you would access it like: properties.resources.myFile,
the correct value to put here would be "myFile" - MyManager
- Type: System.ResourcesResourceManager
The resource manager. Usually Properties.Resources.ResourceManager
Type Parameters
- T
- The type of object to load. It could be something as simple as an int, a class, or a list of classes.
Return Value
Type:
TAn object of the value you specified. Or null if it fails.
See Also