![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | converting of class Im working on a big system. The business logic must be accessable for several different communication ways. ex web service, RPC etc. It is supose to be a framework where different communication modules can be implimented by different persons. I have designed an interface for the logic modules, where the input and output is done through reply and request objects. These object is native c# classes Each communication type is located in its own module, and must take care of the communication with its clients, and call the main module,using the main modules data types. Client (WS)-> WSService - > Common interface busineslogic One of the communication clients use a WCF service. The data comming in to the service and going on to the main module is the same, except that they are in different namespaces, and the WCF class contain a datacontract. I don't want to use the Datacontract class inside the main module, because its data should be completly independing of the communication module, and the programmer should have there own way to communicate the data. sample classes using System.Runtime.Serialization; namespace namespace1 { [DataContract] class testClass { [DataMember] private string testString; public string TestString { get { return testString; } set { testString=value; } } } } namespace namespace2 { class testClass { private string testString; public string TestString { get { return testString; } set { testString=value; } } } } i would like to do this namespace1.testClass t1 = new namespace1.testClass(); namespace2.testClass t2 = new namespace2.testClass(); t1 = t2; Typecasting don't work. The question is.. is there an way that i can transfer the data form one class to another without having to manually transfering each property of the class?. The structure of each class is exactly the same. |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| When a class is both an inherited class of another, and alsoimplements an interface method | .NET General | |||
| win32_pingstatus class / dns class | PowerShell | |||
| Converting FROM .wma and .wav TO .mp3 using WMC 11 | Vista music pictures video | |||
| Converting a .Wim To a ISO | Vista General | |||
| Converting to PDF | Vista General | |||