Computers and Technology

Question

List the rules to keep in mind as you declare a variable in VB.NET

1 Answer

  • - What is your variable scope? Ie., in what parts of the program do you need it?
    - Is it a value type or a reference type. Reference types must always be "newed". Value types are more expensive to pass as parameters.
    - Does the type implement IDisposable? Then you should use it in a using { } clause.
    - Is the type immutable (like string or DateTime)? Then making changes to it is more expensive than you may think.
NEWS TODAY