Universal Type Converter In Visual Studio for Intermediate Developer - Online Free Computer Tutorials.

'Software Development, Games Development, Mobile Development, iOS Development, Android Development, Window Phone Development. Dot Net, Window Services,WCF Services, Web Services, MVC, MySQL, SQL Server and Oracle Tutorials, Articles and their Resources

Monday, July 9, 2012

Universal Type Converter In Visual Studio for Intermediate Developer

This article is about the different possibilities of type conversion provided by the .NET Framework. At the end, it offers a combination of all these methods (and more) within the UniversalTypeConverter which converts nearly every type to another type.

I came across this during the requirement of mapping values, coming from a database, to some objects. Of course, a problem which could be done by an O/R mapper. But this time, the query against the database - and the objects to map the result to - were only known at runtime. It was a kind of reporting tool. Not knowing the exact types, I decided to search for a generic conversion solution. But none of those provided a ready-steady-method like convert x to y for all desired types. So the idea of the UniversalTypeConverter was born.

Read More...


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too. 

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


No comments:

Post a Comment