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. Visual Basic
  4. Most Commonly Used Classes

Most Commonly Used Classes

Scheduled Pinned Locked Moved Visual Basic
csharpquestion
9 Posts 3 Posters 3 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.
  • T Offline
    T Offline
    tanstaafl28
    wrote on last edited by
    #1

    Out of curiosity, is it possible to identify which classes are almost always referenced in a VB.NET assembly, and just add them to every project? If so, what might those classes be? Still coaxing software out of the can after all these years...

    D 1 Reply Last reply
    0
    • T tanstaafl28

      Out of curiosity, is it possible to identify which classes are almost always referenced in a VB.NET assembly, and just add them to every project? If so, what might those classes be? Still coaxing software out of the can after all these years...

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Classes or Namespaces? It's entirely up to you. You could go an add ALL the namespaces to each project, but some of them will require you to add the references for them too. You would have to make your own project templates to add these to every project you make though. You can't tell VS.NET to just add these namespaces to every project, they must be put into the project templates. When the project is built, all the unnecessary references and namespaces are ignored and not put into the final .EXE or .DLL. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      T 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Classes or Namespaces? It's entirely up to you. You could go an add ALL the namespaces to each project, but some of them will require you to add the references for them too. You would have to make your own project templates to add these to every project you make though. You can't tell VS.NET to just add these namespaces to every project, they must be put into the project templates. When the project is built, all the unnecessary references and namespaces are ignored and not put into the final .EXE or .DLL. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        T Offline
        T Offline
        tanstaafl28
        wrote on last edited by
        #3

        Perhaps I still don't understand the differences between classes and namespaces. I thought the namespaces pointed to the classes (and structures). Still coaxing software out of the can after all these years...

        V D 2 Replies Last reply
        0
        • T tanstaafl28

          Perhaps I still don't understand the differences between classes and namespaces. I thought the namespaces pointed to the classes (and structures). Still coaxing software out of the can after all these years...

          V Offline
          V Offline
          VenkatFor NET
          wrote on last edited by
          #4

          Namespaces, I would say to categorize a set of classes. Say, you have classes SqlClient, OracleClient. These two belong to Data manipulation. So, they can be a part of the namespace Data. code may go like this Namespace System.Data Public Class SqlClient Sub SqlConnection () End Sub End Class Public Class OracleClient Sub OracleConnection() End Sub End Class End Namespace Here in this case, if you import System.Data you will have access to both SqlClient and OracleClient classes directly. Else if you just import System Namespace, you will have to refer to these classes as follows Dim s as Data.SqlClient Dim o as Data.OracleClient I would say namespaces or just for the sake of simplicity in code. So, one namespace is a group of multiple classes. Bhaskara

          T 1 Reply Last reply
          0
          • T tanstaafl28

            Perhaps I still don't understand the differences between classes and namespaces. I thought the namespaces pointed to the classes (and structures). Still coaxing software out of the can after all these years...

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            A namespace is a collection of related classes. You don't instantiate a namepsace, but you do to use a class. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

            T 1 Reply Last reply
            0
            • D Dave Kreskowiak

              A namespace is a collection of related classes. You don't instantiate a namepsace, but you do to use a class. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

              T Offline
              T Offline
              tanstaafl28
              wrote on last edited by
              #6

              This harkens back to my Excel.Interop issue. The book example (and the CD file examples) have just the shortened namespace includes at the top, but I had to use the fully qualified namespace in order to get the syntax errors to go away. I can find nothing in the example code that differs from mine, but they don't seem to have to use the full names. Still coaxing software out of the can after all these years...

              D 1 Reply Last reply
              0
              • V VenkatFor NET

                Namespaces, I would say to categorize a set of classes. Say, you have classes SqlClient, OracleClient. These two belong to Data manipulation. So, they can be a part of the namespace Data. code may go like this Namespace System.Data Public Class SqlClient Sub SqlConnection () End Sub End Class Public Class OracleClient Sub OracleConnection() End Sub End Class End Namespace Here in this case, if you import System.Data you will have access to both SqlClient and OracleClient classes directly. Else if you just import System Namespace, you will have to refer to these classes as follows Dim s as Data.SqlClient Dim o as Data.OracleClient I would say namespaces or just for the sake of simplicity in code. So, one namespace is a group of multiple classes. Bhaskara

                T Offline
                T Offline
                tanstaafl28
                wrote on last edited by
                #7

                Thanks for that explaination. It makes more sense now. Still coaxing software out of the can after all these years...

                1 Reply Last reply
                0
                • T tanstaafl28

                  This harkens back to my Excel.Interop issue. The book example (and the CD file examples) have just the shortened namespace includes at the top, but I had to use the fully qualified namespace in order to get the syntax errors to go away. I can find nothing in the example code that differs from mine, but they don't seem to have to use the full names. Still coaxing software out of the can after all these years...

                  D Offline
                  D Offline
                  Dave Kreskowiak
                  wrote on last edited by
                  #8

                  Where did this book come from? It sounds like it has a mountain of errors in it... RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

                  T 1 Reply Last reply
                  0
                  • D Dave Kreskowiak

                    Where did this book come from? It sounds like it has a mountain of errors in it... RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

                    T Offline
                    T Offline
                    tanstaafl28
                    wrote on last edited by
                    #9

                    Visual Basic .NET Step-By-Step and then Visual Basic .NET Programming by Peter Aiken. Taking the (me) out and leaving just () worked, but I had to manually stop the program when I was done, not just by using the x, but by using the stop option in the Debug menu. There are two forms, one has two command buttons, the first command button opens the second form and closes the first, the second command button opens the second form but doesn't close the first. The second form only has a command button for closing itself. It was kind of strange, I was looking at the MCSD/MCAD Windows Applications book too, and there was a garbage collection demo that stored so many bits into memory and supposidly if I sat there long enough and waited, it would start to destroy them. I waited...and waited...and waited. Nothing. I just cleaned off my primary drive and reinstalled Win2K about a month ago (I have XP Pro on my laptop). Still coaxing software out of the can after all these years...

                    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