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. class vs interface

class vs interface

Scheduled Pinned Locked Moved C#
questionvisual-studio
11 Posts 9 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.
  • F Offline
    F Offline
    future3839
    wrote on last edited by
    #1

    hi, could you please some one tell me when should I use interface? what is it,exactly?

    L P R S D 7 Replies Last reply
    0
    • F future3839

      hi, could you please some one tell me when should I use interface? what is it,exactly?

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      No thanks. If one answers one such question, you'll be back asking about inner classes, abstract classes, patterns, inversion of control, and many more. Get yourself an introductory book to C# and study it, there is much to learn, and it doesn't make sense for anyone to write it down here piece by piece. Now when you have a specific question relating to some code of yours, we all will be willing to help you out. :)

      Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum

      Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

      1 Reply Last reply
      0
      • F future3839

        hi, could you please some one tell me when should I use interface? what is it,exactly?

        P Offline
        P Offline
        PIEBALDconsult
        wrote on last edited by
        #3

        Always.

        1 Reply Last reply
        0
        • F future3839

          hi, could you please some one tell me when should I use interface? what is it,exactly?

          R Offline
          R Offline
          Ravi Sant
          wrote on last edited by
          #4

          check this & this i think google is your best friend.

          K 1 Reply Last reply
          0
          • F future3839

            hi, could you please some one tell me when should I use interface? what is it,exactly?

            S Offline
            S Offline
            shivamkalra
            wrote on last edited by
            #5

            Here[^] :) Shivam

            1 Reply Last reply
            0
            • F future3839

              hi, could you please some one tell me when should I use interface? what is it,exactly?

              D Offline
              D Offline
              Dalek Dave
              wrote on last edited by
              #6

              Go to a CLASS or INTERFACE with a book! Better still, CP Archive has This[^] article.

              ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

              1 Reply Last reply
              0
              • R Ravi Sant

                check this & this i think google is your best friend.

                K Offline
                K Offline
                Keith Barrow
                wrote on last edited by
                #7

                No, this is the current instance :-)

                Sort of a cross between Lawrence of Arabia and Dilbert.[^]
                -Or-
                A Dead ringer for Kate Winslett[^]

                L R 2 Replies Last reply
                0
                • K Keith Barrow

                  No, this is the current instance :-)

                  Sort of a cross between Lawrence of Arabia and Dilbert.[^]
                  -Or-
                  A Dead ringer for Kate Winslett[^]

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  :laugh:

                  1 Reply Last reply
                  0
                  • F future3839

                    hi, could you please some one tell me when should I use interface? what is it,exactly?

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #9

                    Ditto what everyone else has said. Also, I think at your stage of learning it is very informative to look closely at some of the existing interfaces in the framework, and how they are implemented. An example, one of many off the top of my head, is say IComparable and/or IComparable<T>. Then read the msdn blurb on the List<T>.Sort() method, and think about how implementing one of those interfaces in some class you design makes it possible to sort a list of instances of that class. Again, I am not contradicting the good advice given by the previous posts, I am simply saying that studying some of the built-in interfaces and finding examples of their usage can be ONE aid to understanding interfaces in general.

                    1 Reply Last reply
                    0
                    • K Keith Barrow

                      No, this is the current instance :-)

                      Sort of a cross between Lawrence of Arabia and Dilbert.[^]
                      -Or-
                      A Dead ringer for Kate Winslett[^]

                      R Offline
                      R Offline
                      Ravi Sant
                      wrote on last edited by
                      #10

                      :)

                      1 Reply Last reply
                      0
                      • F future3839

                        hi, could you please some one tell me when should I use interface? what is it,exactly?

                        P Offline
                        P Offline
                        Pravin Patil Mumbai
                        wrote on last edited by
                        #11

                        Try Google, It is free.

                        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