本文整理汇总了C#中System.Foo.ping方法的典型用法代码示例。如果您正苦于以下问题:C# Foo.ping方法的具体用法?C# Foo.ping怎么用?C# Foo.ping使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Foo
的用法示例。
在下文中一共展示了Foo.ping方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: run
void run()
{
director_basic_MyFoo a = new director_basic_MyFoo();
if (a.ping() != "director_basic_MyFoo::ping()") {
throw new Exception ( "a.ping()" );
}
if (a.pong() != "Foo::pong();director_basic_MyFoo::ping()") {
throw new Exception ( "a.pong()" );
}
Foo b = new Foo();
if (b.ping() != "Foo::ping()") {
throw new Exception ( "b.ping()" );
}
if (b.pong() != "Foo::pong();Foo::ping()") {
throw new Exception ( "b.pong()" );
}
A1 a1 = new A1(1, false);
a1.Dispose();
{
MyOverriddenClass my = new MyOverriddenClass();
my.expectNull = true;
if (MyClass.call_pmethod(my, null) != null)
throw new Exception("null pointer marshalling problem");
Bar myBar = new Bar();
my.expectNull = false;
Bar myNewBar = MyClass.call_pmethod(my, myBar);
if (myNewBar == null)
throw new Exception("non-null pointer marshalling problem");
myNewBar.x = 10;
}
}