Archived
This forum has been archived. Please start a new discussion on GitHub.
using IcePack with c#
W.noon
in Help Center
I am a beginer on Ice, I find that there is no demos about IcePack with c#,
How to use IcePack with c#,and which function in c# acts as IcePack::QueryPrx.CheckedCast() in c++?
thank you !,I love Ice .
How to use IcePack with c#,and which function in c# acts as IcePack::QueryPrx.CheckedCast() in c++?
thank you !,I love Ice .
0
Comments
-
Sorry, at the moment, there is no demo for using IcePack with Icicle. The next release will fix this.
If you want to use IcePack, use the demo that comes with Ice for Java as a guide. The C# code will be very similar to the Java code.
In C#, you do a checked cast by calling checkedCast on the generated helper. (See page 268 in the manual.)
So, to narrow the IcePack::Query proxy, you can do:Ice.ObjectPrx obj = ...; IcePack.QueryPrx q = IcePack.QueryPrxHelper.checkedCast(obj);
Cheers,
Michi.0
