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. classes

classes

Scheduled Pinned Locked Moved C#
csharpoop
3 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.
  • K Offline
    K Offline
    kabutar
    wrote on last edited by
    #1

    hi, while using inheritance if we have two classess ie animal and bird -when do we craete a new object this way in main function animal obj = new bird(); and when are the instances that we create an object to call a method:: i know that we do so wen we have to call a method from another class and to call a nonstatic function into a static function again we create an object. otherthan these what are the other instances we do so ...... thanks

    C#

    C 1 Reply Last reply
    0
    • K kabutar

      hi, while using inheritance if we have two classess ie animal and bird -when do we craete a new object this way in main function animal obj = new bird(); and when are the instances that we create an object to call a method:: i know that we do so wen we have to call a method from another class and to call a nonstatic function into a static function again we create an object. otherthan these what are the other instances we do so ...... thanks

      C#

      C Offline
      C Offline
      Chintan Desai
      wrote on last edited by
      #2

      1st learn to write proper question, then expect to get proper answer.

      Regards Chintan www.visharadsoft.com (I am thinking to change humans to computer, but unfortunately GOD will not give me the source code)

      K 1 Reply Last reply
      0
      • C Chintan Desai

        1st learn to write proper question, then expect to get proper answer.

        Regards Chintan www.visharadsoft.com (I am thinking to change humans to computer, but unfortunately GOD will not give me the source code)

        K Offline
        K Offline
        kabutar
        wrote on last edited by
        #3

        what are the times that we create an object to call a method:: i know that we do so wen we have to 1) call a method from another class and 2)to call a nonstatic function into a static function again we create an object. otherthan these what are the other instances we do so ...... thanks

        C#

        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