Consider the following code: public class TextType { public TextType(String text) { underlyingString = text;
Given this class with an implicit cast operator: public class MyDateTime { public static implicit operator MyDateTime(System.Int64 encoded)
My String class provides an operator char* overload to allow you to pass the string to C functions. Unfortunately a colleague of mine just inadvertently discovered a bug.
In my code using reflections i wrote if (f.FieldType.IsAssignableFrom(\"\".GetType())) I have a class that has an implicit conversion to strings. However the if statement above doesnt catch it. How
I have this function public static implicit operator MyClass(string v) { return new MyClass(v); } and write var.myclass = null;. This calls the implicit operator and passes null as string, which ca
I have an mvc model class created and one of the properties is of type \'MyObject\'.It also has a System.ComponentModel.DataAnnotations.StringLength attribute on it.
I\'m trying to deserialize json to an object model where the collections are represented as IList<T> types.
I have a class that encapsulates some arithmetic, let\'s say fixed point calculations. I like the idea of overloading arithmetic operators, so I write the following: