PC Review


Reply
Thread Tools Rate Thread

How to auto-convert types?

 
 
=?Utf-8?B?S2luZ2hlcmM=?=
Guest
Posts: n/a
 
      12th Feb 2005
Well, I'm programming in vb.net and I'm developing a custom class (named
XmlEl) that inherits from the XmlElement class. It has a New routine that
receives an xmlelement and constructs the XmlEl instance. But in certain
occasions I need the machine to auto-convert an xmlelement to an xmlel,
rather than having to type all the time New XmlEl(XmlElement). As I've
noticed the CType function exists for that cause. For example, to convert an
xmlnode to a xmlelement, one could use Ctype(XmlNode, XmlElement). That's how
I want to use my class: CType(XmlElelement, XmlEl). So, how can I achieve it?
I also noticed in the SDK the class TypeConverter but I just don't know how
to use/apply it on my class. Any ideas or tips??
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to auto-convert types? =?Utf-8?B?S2luZ2hlcmM=?= Microsoft Dot NET Framework 1 12th Feb 2005 06:49 PM
How can I convert the SQL data types to csharp system types.. Champika Nirosh Microsoft C# .NET 1 11th Nov 2004 09:25 AM
Convert from XSD types to/from .NET types =?Utf-8?B?VFQgKFRvbSBUZW1wZWxhZXJlKQ==?= Microsoft C# .NET 2 6th Jul 2004 01:41 PM
Convert from System. types to SQLServer types Gustavo De la Espriella Microsoft ADO .NET 1 28th Nov 2003 06:07 PM
Convert from System. types to SQLServer types Gustavo De la Espriella Microsoft VB .NET 0 28th Nov 2003 05:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:07 PM.