Results 1 to 3 of 3

Thread: Naming Conventions

  1. #1
    Member
    Join Date
    Mar 2013
    Location
    Israel
    Posts
    73
    Rep Power
    5

    Naming Conventions

    In short examples that do not include using directives, use namespace qualifications. If you know that a namespace is imported by default in a project, you do not have to fully qualify the names from that namespace. Qualified names can be broken after a dot (.) if they are too long for a single line, as shown in the following example.

    var currentPerformanceCounterCategory = new System.Diagnostics.
    PerformanceCounterCategory();

    The Best VPN!
    VVV Click Below VVV


  2. #2
    Senior Member
    Join Date
    Mar 2013
    Location
    Russia
    Posts
    240
    Rep Power
    5
    Hey my friend, this is "Tutorials" Section.
    Please Tell us what the code mean and define it.
    Thanks.

    The Best VPN!
    VVV Click Below VVV


  3. #3
    New member
    Join Date
    May 2013
    Posts
    18
    Rep Power
    0
    Quote Originally Posted by Karizan View Post
    Hey my friend, this is "Tutorials" Section.
    Please Tell us what the code mean and define it.
    Thanks.
    It's a generic object used to monitor performance within the System.Diagnostics namespace.
    I'd say to refrain from using "var" as it's pretty abstract and doesn't blend well with older .Net framework version. (I use 2.0 exclusively for an almost default backwards compatibility on modern system. Standard since some releases of XP SP3)
    Not to mention that the compiler is trying to implicitly assign the variable type when using "var", which can easily lead to conversion issues with n00bs.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •