The IDL-to-C# language mapping used by J-Integra® Espresso is kept similar to OMG's standard IDL-to-Java language mapping, due to the conceptual similarities between C# and Java. Both languages support interfaces with multiple inheritances which require explicit implementation by classes. A Java or C# class, on the other hand, can only inherit from a single base class. It therefore seems obvious to identify CORBA interfaces with C# interfaces. As in Java, all administrative functions associated with an IDL interface are made available as part of an additional generated 'Helper' class.
The major difference between the Java and the C# language mapping is the absence of 'Holder' classes. C# allows for in/out parameters and call-by-reference as compared to Java. Therefore, C# does not need special containers for parameters passed by reference.
CORBA types are directly mapped to C# types as far as possible. But the language independent concept of the .NET framework allows the use of J-Integra® Espresso with any language supporting .NET. Examples using C++ and Visual Basic will be provided within this tutorial as well.
| OMG IDL | C#/.NET |
| boolean | bool |
| char | char |
| wchar | char |
| string | string |
| wstring | string |
| octet | byte |
| short | short |
| unsigned short | ushort |
| long | int |
| unsigned long | uint |
| long long | long |
| unsigned long long | ulong |
| float | float |
| double | double |
| long double | double |
| OMG IDL | C#/.NET |
| interface | interface |
| struct | struct |
| enum | enum |
| union | class |
| array | array |
| sequence | array |
| CORBA::ORB | Ics.CORBA.ORB |
| PortableServer::POA | Ics.PortableServer.POA |
| CORBA::Any | Ics.CORBA.Any |
| CORBA::Object | Ics.CORBA.Object |