Click here to Skip to main content
16,006,594 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: help- MCPD or MCSD Pin
ajay5888627-Mar-07 20:45
ajay5888627-Mar-07 20:45 
GeneralRe: help- MCPD or MCSD Pin
kubben28-Mar-07 1:11
kubben28-Mar-07 1:11 
QuestionHow can i show a form with controls when i click a datagrid component Pin
anujose26-Mar-07 20:00
anujose26-Mar-07 20:00 
QuestionOOPS concepts Pin
Shraddha Bhatt26-Mar-07 19:56
Shraddha Bhatt26-Mar-07 19:56 
AnswerRe: OOPS concepts Pin
TwoFaced26-Mar-07 20:09
TwoFaced26-Mar-07 20:09 
GeneralRe: OOPS concepts Pin
Christian Graus27-Mar-07 2:20
protectorChristian Graus27-Mar-07 2:20 
GeneralRe: OOPS concepts Pin
TwoFaced27-Mar-07 13:07
TwoFaced27-Mar-07 13:07 
AnswerRe: OOPS concepts Pin
Christian Graus27-Mar-07 2:24
protectorChristian Graus27-Mar-07 2:24 
Shraddha Bhatt wrote:
If we can use static variables inside instance constructor then why static method or constructor is required?


Because, you can access static variables and methods without ever calling an instance constructor. For example, the MessageBox class is static, you call MessageBox.Show(), without ever creating an instance constructor. If it needs to initialise anything, a static constructor is the only place to do it.

Shraddha Bhatt wrote:
Any practical usage of static or shared method.


Usually, it comes down to offering stateless functionality ( i.e. methods that don't ever change any properties on a class instance ), so that you can call it without having to create an instance. An obvious example, is factory pattern methods. So, instead of saying

Dim f as Foo = new Foo()

you would say

Dim f as Foo = Foo.MakeOne();

There are benefits to this design, and obviously, I cannot call MakeOne to create a Foo, if it's not a static method, because, if the constructor is private, I could never have an instance of Foo on which to call the method.


Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

QuestionVb.net Breakpoints are not working Pin
max_panky26-Mar-07 19:43
max_panky26-Mar-07 19:43 
AnswerRe: Vb.net Breakpoints are not working Pin
TwoFaced26-Mar-07 20:14
TwoFaced26-Mar-07 20:14 
GeneralRe: Vb.net Breakpoints are not working Pin
max_panky26-Mar-07 21:19
max_panky26-Mar-07 21:19 
QuestionTwo colomn data bind to one combo box. Pin
Kusal26-Mar-07 17:15
Kusal26-Mar-07 17:15 
AnswerRe: Two colomn data bind to one combo box. Pin
Christian Graus26-Mar-07 17:21
protectorChristian Graus26-Mar-07 17:21 
GeneralRe: Two colomn data bind to one combo box. Pin
Kusal26-Mar-07 17:24
Kusal26-Mar-07 17:24 
AnswerRe: Two colomn data bind to one combo box. Pin
balakpn27-Mar-07 0:20
balakpn27-Mar-07 0:20 
AnswerRe: Two colomn data bind to one combo box. Pin
Marcus J. Smith27-Mar-07 2:29
professionalMarcus J. Smith27-Mar-07 2:29 
AnswerRe: Two colomn data bind to one combo box. Pin
Jaiprakash M Bankolli28-Mar-07 1:36
Jaiprakash M Bankolli28-Mar-07 1:36 
QuestionPreload images Pin
Anybloodyid26-Mar-07 10:03
Anybloodyid26-Mar-07 10:03 
AnswerRe: Preload images Pin
Christian Graus26-Mar-07 10:07
protectorChristian Graus26-Mar-07 10:07 
QuestionHow to create an Outlook Add In using VB2005 Pin
mark_baars26-Mar-07 9:18
mark_baars26-Mar-07 9:18 
QuestionEdit.ScrollLineDown (Scrolls text down one line) command. Pin
Jason Weibel26-Mar-07 6:40
Jason Weibel26-Mar-07 6:40 
AnswerRe: Edit.ScrollLineDown (Scrolls text down one line) command. Pin
Marcus J. Smith26-Mar-07 7:37
professionalMarcus J. Smith26-Mar-07 7:37 
GeneralRe: Edit.ScrollLineDown (Scrolls text down one line) command. Pin
Jason Weibel26-Mar-07 9:32
Jason Weibel26-Mar-07 9:32 
Questionsophisticated multipane (or "paneled") Windows Form UI Pin
JW73826-Mar-07 6:30
JW73826-Mar-07 6:30 
QuestionAuto complete combobox inside a datagrid Pin
xbiplav26-Mar-07 6:01
xbiplav26-Mar-07 6:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.