本文整理汇总了C#中DataClass.GetSomething方法的典型用法代码示例。如果您正苦于以下问题:C# DataClass.GetSomething方法的具体用法?C# DataClass.GetSomething怎么用?C# DataClass.GetSomething使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataClass
的用法示例。
在下文中一共展示了DataClass.GetSomething方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestUseCase
public static void TestUseCase()
{
{
var i = 1;
var j = Script.Write<int>("{i}", i);
Assert.AreEqual(j, 1, "Bridge785 by name");
}
{
var i = 2;
var j = Script.Write<int>("{0}", i);
Assert.AreEqual(j, 2, "Bridge785 by index");
}
{
var i = new DataClass() { Value = 3 };
var j = Script.Write<int>("{0}", i.Value);
Assert.AreEqual(j, 3, "Bridge785 by index for DataClass property");
}
{
var i = new DataClass() { Value = 4 };
var j = Script.Write<int>("{0}", i);
Assert.AreEqual(j, i, "Bridge785 by index for DataClass");
}
{
var i = new DataClass() { Value = 5 };
var j = Script.Write<int>("{0}", i.GetSomething(55).Value);
Assert.AreEqual(j, 55, "Bridge785 by index for DataClass method");
}
{
var i = new DataStruct() { Value = 6 };
var j = Script.Write<int>("{0}", i.Value);
Assert.AreEqual(j, 6, "Bridge785 by index for DataStruct property");
}
{
var i = new DataStruct() { Value = 7 };
var j = Script.Write<int>("{0}", i.GetSomething(77).Value);
Assert.AreEqual(j, 77, "Bridge785 by index for DataStruct method");
}
}