Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
305
UltraDateTimeEditor Nullable Property
posted

What is the purpose of the Nullable property.  Regardless if it is set to True, the MinDate Property cannot be Null or Nothing and the DateTime Property cannot be Null or Nothing.  So, how do you get the control to display nothing when the data field is Nullable and the current record has a Null value.

regards,

Rob

Parents
No Data
Reply
  • 10
    posted

    When a type can be assigned null is called nullable, that means the type has no value. All Reference Types are nullable by default, e.g. String, and all ValueTypes are not, e.g. Int32. The Nullable < T > structure is using a value type as a nullable type. By default DateTime is not nullable because it is a Value Type, using the nullable operator introduced in C# 2, you can achieve this.

    Using a question mark (?) after the type or using the generic style Nullable.

    Nullable < DateTime > nullDateTime;

    or

    DateTime? nullDateTime = null;

    More info...http://net-informations.com/q/faq/nullable.html

     

    Crony

Children
No Data