本文整理汇总了C#中CustomType类的典型用法代码示例。如果您正苦于以下问题:C# CustomType类的具体用法?C# CustomType怎么用?C# CustomType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CustomType类属于命名空间,在下文中一共展示了CustomType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
public static void Main (string[] args) {
var ct = new CustomType(1);
var mc = new MyClass();
mc.UpdateWithNewState(2, ct);
ct.Value = 3;
Console.WriteLine("ct={0}, mc={1}", ct, mc);
}
示例2: Main
public static void Main (string[] args) {
var instance = new CustomType();
instance.BaseMethod();
instance.Method();
instance.BaseMethod2(3);
instance.Method2(4);
}
示例3: TriangleEntity
public TriangleEntity(Guid id,CustomType.Polygon polygon)
: base(id)
{
_Polygon = polygon;
var points = new Queue<CustomType.Vector2>(_Polygon.Points);
var firstPoint = points.Dequeue();
float top = firstPoint.Y;
float down = firstPoint.Y ;
float left = firstPoint.X;
float right = firstPoint.X;
while (points.Count > 0)
{
var point = points.Dequeue();
if (point.X > right)
{
right = point.X;
}
if (point.X < left)
{
left = point.X;
}
if (point.Y < top)
{
top = point.Y;
}
if (point.Y > down)
{
down = point.Y;
}
}
_QuadTreeObjectAbility = new PhysicalAbility(new Regulus.CustomType.Rect(left , top , right - left , down - top ) , this);
_Polygon.BuildEdges();
}
示例4: Main
public static void Main (string[] args) {
dynamic instance = new CustomType();
Console.WriteLine(instance);
instance.A = 2;
instance.B = 4;
Console.WriteLine(instance);
}
示例5: Main
public static void Main (string[] args) {
var instance = new CustomType();
Console.WriteLine("{0}, {1}", instance[0], instance[1]);
instance[2] = 3;
}
示例6: Main
public static void Main (string[] args) {
var instance = new CustomType();
Console.WriteLine(
"instance.A = {0}, instance.BaseA = {1}",
instance.A, instance.BaseA
);
}
示例7: Main
public static void Main (string[] args) {
var instance = new CustomType();
instance.Event += PrintNumber;
instance.Event += PrintNumberTimes2;
instance.Event -= PrintNumber;
instance.Event -= PrintNumberTimes2;
}
示例8: Main
public static void Main (string[] args) {
var list = new CustomType[] { new CustomType() };
var collection = (ICollection<CustomType>)list;
foreach (var value in (ICollection<IInterface>)collection) {
Console.WriteLine(value);
}
}
示例9: Main
public static void Main (string[] args) {
CustomType a = new CustomType(1), b = new CustomType(2);
Console.WriteLine("a={0}, b={1}", a, b);
b = a;
Console.WriteLine("a={0}, b={1}", a, b);
b = new CustomType(3);
Console.WriteLine("a={0}, b={1}", a, b);
}
示例10: Main
public static void Main (string[] args) {
var a = new CustomType(1);
var b = new CustomType(2);
var c = a;
Console.WriteLine("a==a: {0}, a==b: {1}, a==c: {2}", a.Equals(a), a.Equals(b), a.Equals(c));
c.Value = 3;
Console.WriteLine("a==a: {0}, a==b: {1}, a==c: {2}", a.Equals(a), a.Equals(b), a.Equals(c));
}
示例11: Main
public static void Main (string[] args) {
var instance = new CustomType();
Console.WriteLine(instance.Value);
instance.Value += 2;
Console.WriteLine(instance.Value);
Console.WriteLine(instance.Value += 2);
Console.WriteLine(instance.Value);
}
示例12: Main
public static void Main (string[] args) {
var instance = new CustomType();
instance.A();
((IInterface1)instance).A();
((IInterface2)instance).A();
((IInterface3)instance).A();
}
示例13: Main
public static void Main (string[] args) {
CustomType a = new CustomType(1), b = new CustomType(2), c = a;
Console.WriteLine("a={0}, b={1}, c={2}", a, b, c);
a *= b;
Console.WriteLine("a={0}, b={1}, c={2}", a, b, c);
c.Value = 16;
Console.WriteLine("a={0}, b={1}, c={2}", a, b, c);
}
示例14: When_converting_to_object_based_on_typeinfo
public When_converting_to_object_based_on_typeinfo()
{
var dynamicObject = new DynamicObject(typeof(CustomType))
{
{ "StringValue", StringValue },
};
obj = dynamicObject.CreateObject() as CustomType;
}
示例15: Main
public static void Main (string[] args) {
var a = new CustomType(1);
CustomType b = ReturnArgument(ReturnIncrementedArgument(ReturnArgument(a)));
Console.WriteLine("a={0}, b={1}", a, b);
a.Value = 3;
Console.WriteLine("a={0}, b={1}", a, b);
b = ReturnArgument(ReturnArgument(a));
Console.WriteLine("a={0}, b={1}", a, b);
}