Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Significance of the Static and Virtual

Significance of the Static and Virtual

Scheduled Pinned Locked Moved C#
question
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Pr teek B h
    wrote on last edited by
    #1

    Hi, This might seem pretty basic but can anybody explain why and/or when a method should have the static or virtual? i.e. public static void Method1() {} Thanks, Prateek

    W 1 Reply Last reply
    0
    • P Pr teek B h

      Hi, This might seem pretty basic but can anybody explain why and/or when a method should have the static or virtual? i.e. public static void Method1() {} Thanks, Prateek

      W Offline
      W Offline
      Wendelius
      wrote on last edited by
      #2

      I think they are very well described in BOL with examples: - static (C# Reference)[^] - virtual (C# Reference)[^]

      The need to optimize rises from a bad design.My articles[^]

      P 1 Reply Last reply
      0
      • W Wendelius

        I think they are very well described in BOL with examples: - static (C# Reference)[^] - virtual (C# Reference)[^]

        The need to optimize rises from a bad design.My articles[^]

        P Offline
        P Offline
        Pr teek B h
        wrote on last edited by
        #3

        I guess i should have checked msdn first before posting the question. :doh: Thanks :)

        W 1 Reply Last reply
        0
        • P Pr teek B h

          I guess i should have checked msdn first before posting the question. :doh: Thanks :)

          W Offline
          W Offline
          Wendelius
          wrote on last edited by
          #4

          You're welcome.

          The need to optimize rises from a bad design.My articles[^]

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups