|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
namespace consoletest
{
#region [ data objects ]
public class BaseClass
{
public string Name { get; set; }
public string Code { get; set; }
}
public class Class1 : BaseClass
{
public Class1() { }
public Class1(string name, string code, Guid g)
{
Name = name;
Code = code;
guid = g;
}
public Guid guid { get; set; }
}
public class Class2 : BaseClass
{
public Class2() { }
public Class2(string name, string code, string desc)
{
Name = name;
Code = code;
Description = desc;
}
public string Description { get; set; }
}
public enum Gender
{
Male,
Female
}
public class ClassWithAllSupportedTypes
{
public ClassWithAllSupportedTypes()
{
items = new List<BaseClass>();
date = DateTime.Now;
multilineString = @"
AJKLjaskljLA
ahjksjkAHJKS سلام فارسی
AJKHSKJhaksjhAHSJKa
AJKSHajkhsjkHKSJKash
ASJKhasjkKASJKahsjk
";
isNew = true;
booleanValue = true;
ordinaryDouble = 0.001;
gender = Gender.Female;
intarray = new int[5] {1,2,3,4,5};
}
public bool booleanValue { get; set; }
public DateTime date {get; set;}
public string multilineString { get; set; }
public List<BaseClass> items { get; set; }
public decimal ordinaryDecimal {get; set;}
public double ordinaryDouble { get; set ;}
public bool isNew { get; set; }
public string laststring { get; set; }
public Gender gender { get; set; }
public DataSet dataset { get; set; }
public Dictionary<string,BaseClass> stringDictionary { get; set; }
public Dictionary<BaseClass,BaseClass> objectDictionary { get; set; }
public Dictionary<int,BaseClass> intDictionary { get; set; }
public Guid? nullableGuid {get; set;}
public decimal? nullableDecimal { get; set; }
public double? nullableDouble { get; set; }
public Hashtable hash { get; set; }
public BaseClass[] arrayType { get; set; }
public byte[] bytes { get; set; }
public int[] intarray { get; set; }
}
#endregion
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.