RcBuilder@walla.com
call centre: 054-5614020

implicit C#

Posted by: RcBuilder  /   Category: Converters / Extensions / implicit / SOURCE CODE   /   No Comments
29
May
2014

implicit C# structure: public static implicit operator Class3(Class1 c); // implicit Convert Class1 to Class3 public static implicit operator Class3(string s); // implicit Convert string to Class3 public static implicit operator string(Class3 c); // implicit class3 to string ... ... example: public class ClassA { public string FName { private set; get; } public string LName { private set; get; } public byte Age { private set;.

Read more

implicit cast to return a single instance object

Posted by: RcBuilder  /   Category: Converters / Extensions / implicit / Reference Types / SOURCE CODE   /   No Comments
29
May
2014

using implicit cast to return a single instance object /* the abillity to return a single instance for multiple objects using implicit cast we defined 2 classes (class1 and class2) and we define 2 services (service1 and service2) each service DoWork method should return a different object type (service1 return class1 and service2 return class2) demand: we want to share it.

Read more
  • פיתוח מערכות
  • פתרונות טכנולוגים
  • קידום אתרים
  • בניית אתרים