2010-10-20 17:43:14 +02:00
|
|
|
using System;
|
2010-10-28 11:43:04 +02:00
|
|
|
namespace cs2jTest.Various.Features.join.yield
|
2010-10-20 17:43:14 +02:00
|
|
|
{
|
2010-10-21 16:31:09 +02:00
|
|
|
|
|
|
|
// delegate declaration
|
|
|
|
public delegate string MyDelegate(int i);
|
|
|
|
|
2010-10-20 17:43:14 +02:00
|
|
|
public class Various
|
|
|
|
{
|
|
|
|
public Various ()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2010-11-01 08:34:45 +01:00
|
|
|
public const int MY_IMPORTANT_INT = 23;
|
|
|
|
public const String MY_IMPORTANT_STRING = "Kevin";
|
2010-11-01 13:54:23 +01:00
|
|
|
private int myInt = 0;
|
2010-11-01 08:34:45 +01:00
|
|
|
private System.Collections.Generic.IDictionary<int,short> myDict;
|
2010-10-21 16:31:09 +02:00
|
|
|
|
2010-10-20 17:43:14 +02:00
|
|
|
public string TestRWProperty {get; set;}
|
|
|
|
|
|
|
|
public string get_TestRWProperty() {
|
|
|
|
return "hello";
|
|
|
|
}
|
|
|
|
|
2010-11-01 08:34:45 +01:00
|
|
|
public string testgen<T>(T i) {
|
|
|
|
return "hello";
|
|
|
|
}
|
|
|
|
|
2010-10-20 17:43:14 +02:00
|
|
|
private string _testROProperty = null;
|
|
|
|
public string TestROProperty {
|
|
|
|
get { return _testROProperty; }
|
|
|
|
}
|
|
|
|
private string _testWOProperty = null;
|
|
|
|
public string TestWOProperty {
|
|
|
|
set { _testWOProperty = value;}
|
|
|
|
}
|
|
|
|
|
2010-10-20 18:51:41 +02:00
|
|
|
public static explicit operator Various(int i)
|
|
|
|
{
|
|
|
|
return new Various();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static implicit operator Various(string i)
|
|
|
|
{
|
|
|
|
return new Various();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static explicit operator bool(Various v)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static implicit operator string(Various v)
|
|
|
|
{
|
|
|
|
return "Various";
|
|
|
|
}
|
|
|
|
|
2010-11-01 13:54:23 +01:00
|
|
|
public static Various operator ++(Various v) {
|
|
|
|
Various temp = new Various();
|
|
|
|
temp.myInt = v.myInt+1;
|
|
|
|
return temp;
|
|
|
|
}
|
2010-10-20 17:43:14 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|