1

Topic: C# implicit "one-pass"?

It would be desirable to make such piece: class A {private string _value; public A (string value) {_value = value;} public override string ToString () {return _value;} static public implicit operator A (string value) {return new A (value);} static public implicit operator A (int value) {return new A (value. ToString ());}} class B {private A _a; public B (A a) {_a = a;} public override string ToString () {return _a. ToString ();} static public implicit operator B (A a) {return new B (a);}} and then to write: B b; b = "123";//Here that the line implicitly was transformed in A, and already A is implicit in B b = 15;//it is similar. And so with all implicit conversions which are registered for A It is possible  for all types of conversion from A in B and stupidly to register something of type: static public implicit operator B (string a) {return new B (a);} static public implicit operator B (int a) {return new B (a);} but it somehow is not fascinating

2

Re: C# implicit "one-pass"?

Hello, karbofos42, you wrote: K> It would be desirable to make such piece:... So does not work in C#. Here an explanation http://stackoverflow.com/questions/2796 … resolution