本文整理汇总了C#中CustomType类的典型用法代码示例。如果您正苦于以下问题:C# CustomType类的具体用法?C# CustomType怎么用?C# CustomType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CustomType类属于命名空间,在下文中一共展示了CustomType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:GlennSandoval,项目名称:JSIL,代码行数:7,代码来源:StructCtorInvocation.cs
示例2: Main
public static void Main (string[] args) {
var instance = new CustomType();
instance.BaseMethod();
instance.Method();
instance.BaseMethod2(3);
instance.Method2(4);
}
开发者ID:GlennSandoval,项目名称:JSIL,代码行数:7,代码来源:InvokeBaseMethod.cs
示例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();
}
开发者ID:jiowchern,项目名称:Regulus,代码行数:35,代码来源:TriangleEntity.cs
示例4: Main
public static void Main (string[] args) {
dynamic instance = new CustomType();
Console.WriteLine(instance);
instance.A = 2;
instance.B = 4;
Console.WriteLine(instance);
}
开发者ID:GlennSandoval,项目名称:JSIL,代码行数:7,代码来源:DynamicPropertySet.cs
示例5: Main
public static void Main (string[] args) {
var instance = new CustomType();
Console.WriteLine("{0}, {1}", instance[0], instance[1]);
instance[2] = 3;
}
开发者ID:GlennSandoval,项目名称:JSIL,代码行数:7,代码来源:Indexers.cs
示例6: Main
public static void Main (string[] args) {
var instance = new CustomType();
Console.WriteLine(
"instance.A = {0}, instance.BaseA = {1}",
instance.A, instance.BaseA
);
}
开发者ID:GlennSandoval,项目名称:JSIL,代码行数:7,代码来源:BaseFields.cs
示例7: Main
public static void Main (string[] args) {
var instance = new CustomType();
instance.Event += PrintNumber;
instance.Event += PrintNumberTimes2;
instance.Event -= PrintNumber;
instance.Event -= PrintNumberTimes2;
}
开发者ID:GlennSandoval,项目名称:JSIL,代码行数:7,代码来源:CustomEvents.cs
示例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);
}
}
开发者ID:GlennSandoval,项目名称:JSIL,代码行数:7,代码来源:Issue452.cs
示例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);
}
开发者ID:GlennSandoval,项目名称:JSIL,代码行数:8,代码来源:VerbatimVariableMutation.cs
示例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));
}
开发者ID:GlennSandoval,项目名称:JSIL,代码行数:8,代码来源:ClassEquals.cs
示例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);
}
开发者ID:GlennSandoval,项目名称:JSIL,代码行数:8,代码来源:PropertyIncrementEfficiency.cs
示例12: Main
public static void Main (string[] args) {
var instance = new CustomType();
instance.A();
((IInterface1)instance).A();
((IInterface2)instance).A();
((IInterface3)instance).A();
}
开发者ID:GlennSandoval,项目名称:JSIL,代码行数:8,代码来源:PrivateNames.cs
示例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);
}
开发者ID:GlennSandoval,项目名称:JSIL,代码行数:8,代码来源:StructLateDeclaration.cs
示例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;
}
开发者ID:6bee,项目名称:aqua-core,代码行数:9,代码来源:When_converting_to_object_based_on_typeinfo.cs
示例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);
}
开发者ID:GlennSandoval,项目名称:JSIL,代码行数:9,代码来源:NestedReturn.cs
示例16: ArrayCanBeOfAnyType
public void ArrayCanBeOfAnyType()
{
CustomType[] arrayOfCustomTypes = new CustomType[] { new CustomType() };
Assert.AreSame(____, arrayOfCustomTypes.GetType(), "Array elements can be of any type, including an array type.");
int[] array = { 1, 2, 3 };
ChangeSecondElementOfArrayToOne(array);
Assert.AreEqual(____, array[1], "Array types are reference types derived from the abstract base type Array");
}
开发者ID:elpikel,项目名称:sharp_koans,代码行数:9,代码来源:Arrays.cs
示例17: Main
public static void Main (string[] args) {
var cts = new CustomType[3];
cts[0] = new CustomType(1);
cts[1] = new CustomType(2.5f);
cts[2] = cts[0];
cts[0] *= 3;
cts[2].Value = 16;
Console.WriteLine("1={0}, 2={1}, 3={2}", cts[0], cts[1], cts[2]);
}
开发者ID:GlennSandoval,项目名称:JSIL,代码行数:9,代码来源:RecursiveArrayInitializer.cs
示例18: Main
public static void Main (string[] args) {
var a = new CustomType(1);
var b = new CustomType(2);
var c = a + b;
Console.WriteLine("a={0}, b={1}, c={2}", a, b, c);
c = ReturnArgument(a + b);
Console.WriteLine("a={0}, b={1}, c={2}", a, b, c);
Console.WriteLine("{0}", a + c);
}
开发者ID:GlennSandoval,项目名称:JSIL,代码行数:9,代码来源:PureStructOperator.cs
示例19: Main
public static void Main (string[] args) {
var a = new CustomType(1);
var b = new CustomType(2);
var c = new CustomType(3);
var d = CustomType.AddThree(a, b, c);
Console.WriteLine("a={0}, b={1}, c={2}, d={3}", a, b, c, d);
d = ReturnArgument(CustomType.AddThree(a, b, c));
Console.WriteLine("a={0}, b={1}, c={2}, d={3}", a, b, c, d);
}
开发者ID:GlennSandoval,项目名称:JSIL,代码行数:9,代码来源:NestedReturnNew.cs
示例20: Main
public static void Main (string[] args) {
var instanceA = new CustomType();
var instanceB = new CustomType2();
Console.WriteLine(
"{0} {1} {2} {3}", instanceA, instanceA.GetType(),
instanceB, instanceB.GetType()
);
}
开发者ID:GlennSandoval,项目名称:JSIL,代码行数:9,代码来源:GetType.cs
注:本文中的CustomType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论