Unlike C++, in C# you can\'t overload the assignment operator.
I\'m doing a custom Number class for arithmetic operations with very large numbers and I want it to h
you can use the 'implicit' keyword to create an overload for the assignment:
Suppose you have a type like Foo, that you feel is implicitly convertable from a string. You would write the following static method in your Foo class:
public static implicit operator Foo(string normalString)
{
//write your code here to go from string to Foo and return the new Foo.
}
Having done that, you can then use the following in your code:
Foo x = "whatever";