L
Looch
All,
Given the two classes below:
namspace Namespace1
public class MyClass
{
public string test1;
public string test2;
}
..........
namespace Namespace2
public class MyClass
{
public string test1;
public string test2;
}
.........................
static void Main (string[], args)
{
myClass1 = new Namespace1.MyClass();
myClass2 = new Namespace2.MyClass();
myClass1.test1 = "Test1";
myClass1.test2 = "Test2";
myClass1 = mcClass2; //Problem because of the diffrent namespaces.
}
How can I set the two equal without iterating through each of the
variables setting each equal?
A little background, the Namespace2.MyClass object is a remotable
object with about one hundred class variables and setting each one,
one at a time is making for a somewhat chatty interface. What can I do
to set the two objects equal without iterating through the whole
class?
Thanks for any suggestions.
Given the two classes below:
namspace Namespace1
public class MyClass
{
public string test1;
public string test2;
}
..........
namespace Namespace2
public class MyClass
{
public string test1;
public string test2;
}
.........................
static void Main (string[], args)
{
myClass1 = new Namespace1.MyClass();
myClass2 = new Namespace2.MyClass();
myClass1.test1 = "Test1";
myClass1.test2 = "Test2";
myClass1 = mcClass2; //Problem because of the diffrent namespaces.
}
How can I set the two equal without iterating through each of the
variables setting each equal?
A little background, the Namespace2.MyClass object is a remotable
object with about one hundred class variables and setting each one,
one at a time is making for a somewhat chatty interface. What can I do
to set the two objects equal without iterating through the whole
class?
Thanks for any suggestions.