because of my project, learned something about vb.net. and now by chance, find this stuff. it's pretty cool.
visual studio 2005
<a href="http://msdn.microsoft.com/library/yf7b9sy7(en-us,vs.80).aspx">other versions</a>
if you have defined a class or structure, you can define a type conversion operator between the type of your class or structure and another data type (such as integer, double, or string).
defining an operator on a class or structure is also called overloading the operator.
the following example defines conversion operators between a structure called digit and a byte.
<a>vb</a>
<a href="http://msdn.microsoft.com/library/yf7b9sy7(en-us,vs.80).aspx">c#</a>
<a href="http://msdn.microsoft.com/library/yf7b9sy7(en-us,vs.80).aspx">c++</a>
<a href="http://msdn.microsoft.com/library/yf7b9sy7(en-us,vs.80).aspx">f#</a>
<a href="http://msdn.microsoft.com/library/yf7b9sy7(en-us,vs.80).aspx">jscript</a>
<a href="http://msdn.microsoft.com/library/yf7b9sy7(en-us,vs.80).aspx">copy</a>
you can test the structure digit with the following code.
欢迎加群互相学习,共同进步。qq群:ios: 58099570 | android: 330987132 | go:217696290 | python:336880185 | 做人要厚道,转载请注明出处!http://www.cnblogs.com/sunshine-anycall/archive/2010/12/22/1913789.html