Question

  • Creator
    Topic
  • #2153567

    How to read default

    Locked

    by kennethnyc ·

    Lets say i have 10 fixed fields which its values needs to read from a file however my boss will give me new values in a new file which he defines from time to time

    what is the best approach to do this in VB.net ?

All Answers

  • Author
    Replies
    • #2928240

      Clarifications

      by kennethnyc ·

      In reply to How to read default

      Clarifications

    • #2919399

      Some examples here…

      by Anonymous ·

      In reply to How to read default

      If you have a custom control with a custom property, you can specify a default value for it by using the DefaultValueAttribute. For example: . This will tell Visual Studio.NET not to serialize the value to the container’s code when it is equal to the default value (an empty string in this case). However, if the type of your property is an Enum, you can’t just specify the default enum value. You must use an overload to specify the type of the enum and the default value as a string. So use

      instead of

      Note that both methods work in C#, but only the first one works in VB.NET.
      http://www.codeproject.com/KB/vb/appsettings2005.aspx
      http://www.google.com/search?hl=en&q=How+to+read+default+values+in+VB.net&btnG=Search

      Please post back if you have any more problems or questions.

Viewing 1 reply thread