Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Do you think that it is like a jungle or not? I always lost the ways to find the correct class.

 

What is it with System namespace in mscorlib assembly and System namespace in System assembly? How come there are 2 namespaces that have the same name existed by default? And it seems that some other namespaces (only name) are duplicated too.

 

How to recognize classes that require "New" statement with "Dim"? And how to recognize what classes that don't require "New"?

 

:confused: :D

Don't judge a man by his look. Don't judge a book by its cover. :D
  • *Experts*
Posted

There are no two namespaces with the name System. The classes and such from both assemblies were simply included in the System namespace. For example you could create a DLL that would have all its classes in the Windows.Forms namespace.

 

To use shared methods, properties etc. of the class you don't need to use the New keyword.

  • Leaders
Posted
How to recognize classes that require "New" statement with "Dim"? And how to recognize what classes that don't require "New"?

To be safe, you can just declare all of your variables and then initialize them to be New.

Dim R As Anything = New Anything.

But, usually a Class and a Delegate are the only things that need to be initialized with New... I think.

 

In the picture I circled the class... a delegate has a purple box in front of a gray suitcase. Those are what you have to initialize with New. :)

Iceplug, USN

One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(

Posted

:D Ok thanks. I have another question. Is there a way to distinguish between a class that takes parameter and a class doesn't? I mean by looking at Object Browser. :rolleyes:

 

Example for the class that takes parameter.

Dim s As DirectoryInfo = New DirectoryInfo("c:\test\")

Don't judge a man by his look. Don't judge a book by its cover. :D
  • Leaders
Posted

In the Object Browser, the parameters for the New event (constructor) will be listed...

You do have to click on the name of the class that you are looking at. :)

Iceplug, USN

One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(

Posted
MS has always had posters for all kinds of object models. I must have a whole box of them by now...

 

my VB.Net came with nothing. It's like they laughed at me and said "Its discounted, what do you expext?"

 

Then I got VS.Net and got 7 cds, books and posters... damn, after I opened the box, I couldn't get it all back in :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...