Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using ToString in VB.NET code in ASP.NET Web Page
Message
From
17/11/2009 14:28:59
 
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
ASP.NET
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01435079
Message ID:
01435266
Views:
40
>Hi,
>
>Just realized that my reply to Charles had nothing to do with the question :-}
>I think the true answer is that the String class must have an operator overload for type Object that returns a new string with Object.ToString() appended. Silly e.g.:
public class MyClass
>    {
>        public override string ToString()
>        {
>            return "World";
>        }
>    }
then:
string s1 = "Hello ";
>            s1 = s1 + new MyClass();
>
>>>


That's what I was thinking too

something like
public static implicit operator string(object obj)
		{
			return obj.ToString();
		}
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform