Windows Store apps:missing. NET typessuggest A change success!
Thank for helping us improve the quality of Unity documentation. Although we cannot accept all submissions, we do read the suggested change from our users and would make updates where app Licable.
Closesumbission failed
For some reason your suggested the change could isn't be submitted. Please try again in a few minutes. And thank taking the time to help us improve the quality of Unity documentation.
CloseYour name Your EmailSuggestion * <textarea id="suggest_body" class="req"></textarea>Submit Suggestion
Cancel
On the Windows Store Apps Microsoft. NET is used instead of Mono. There is a special. NET version for this platform, which is not entirely compatible with Mono.
In particular some data types is missing and some other classes don ' t has certain methods, that the same classes does have In Mono.
To make porting existing games to Windows Store Apps easier, some of the missing. NET types is provided by Unity. In addition some extension methods and replacement types were added to make migration easier.
Types, provided by Unity include:
- System.Collections.ArrayList
- System.Collections.Hashtable
- System.Collections.Queue
- System.Collections.SortedList
- System.Collections.Stack
- System.Collections.Specialized.HybridDictionary
- System.Collections.Specialized.ListDictionary
- System.Collections.Specialized.NameValueCollection
- System.Collections.Specialized.OrderedDictionary
- System.Collections.Specialized.StringCollection
- System.IO.Directory
- System.IO.File
- System.IO.FileStream
- System.Xml.XmlDocument
- System.Xml.XmlTextReader
- System.Xml.XmlTextWriter
In addition to these a namespace winrtlegacy are added to provide additional classes and extention methods. Among there is:
- Extention Methods Close () for most System.IO classes (alternatively-can use Dispose (), which-available on both Mono and. NET for Windows Store Apps)
- Winrtlegacy.typeextensions have methods GetConstructor (), GetMethod (), GetProperty () for System.Type
- WinRTLegacy.IO.StreamReader class, that's compatible with Mono System.IO.StreamReader
- WinRTLegacy.IO.StreamWriter class, that's compatible with Mono System.IO.StreamWriter
- WinRTLegacy.Xml.XmlReader class, that's compatible with Mono System.Xml.XmlReader
- WinRTLegacy.Xml.XmlWriter class, that's compatible with Mono System.Xml.XmlWriter
The simplest the replacement classes from Winrtlegacy is via using the directive:
#if NETFX_COREusing XmlReader = WinRTLegacy.Xml.XmlReader;#elseusing XmlReader = System.Xml.XmlReader;#endif
Reference URL: http://docs.unity3d.com/Manual/windowsstore-missingtypes.html
Considerations for using the C # language in unity to publish normally in the development environment and to report that data types do not support errors