Most Commonly Used Classes
-
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...
-
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...
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
-
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
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...
-
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...
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
-
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...
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
-
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
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...
-
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
Thanks for that explaination. It makes more sense now. Still coaxing software out of the can after all these years...
-
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...
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
-
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
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...