问题
I found this table listing the limitations of the .NET Micro framework in embedded development, it states that generics are not available due to the size of the image this would create. The memory footprint needs to be below 300KB, and the inclusion of generics pushes the size over this limit.
Does this mean that any Micro framework code would need to go back to the ways of the ArrayList and related lack of type safety?
What other impacts would these limitations have on development using the .NET micro framework?
Thanks
回答1:
You are down to arrays, Stack, Queue and ArrayList. There is no lack of type safety, these classes throw an InvalidCastException when the programmer got it wrong. This is not a problem, tons of code have been written in .NET 1.x without generics and these kind of bugs flush out quickly.
The table you linked to doesn't show the large number of standard helper classes that are missing. That could make development awkward when you get started and haven't gotten a feel yet for what's available. Just in the beginning, you'll pick up fast. The fact that it is so small also makes it quick to master.
来源:https://stackoverflow.com/questions/3327036/net-micro-framework-and-unsupported-features-what-is-the-impact