Click here to Skip to main content
15,902,870 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Contains Method returns false if string and parameter are equal? Pin
Shameel19-Jan-12 19:07
professionalShameel19-Jan-12 19:07 
QuestionDatabound combobox filtering issue Pin
Stefano Leoni13-Jan-12 12:29
Stefano Leoni13-Jan-12 12:29 
AnswerRe: Databound combobox filtering issue Pin
Stefano Leoni17-Jan-12 3:17
Stefano Leoni17-Jan-12 3:17 
Questiondrop down list selected value Pin
Seema Bawa13-Jan-12 11:11
Seema Bawa13-Jan-12 11:11 
QuestionRe: drop down list selected value Pin
Richard MacCutchan13-Jan-12 22:31
mveRichard MacCutchan13-Jan-12 22:31 
AnswerRe: drop down list selected value Pin
sri08018818-Jan-12 23:44
sri08018818-Jan-12 23:44 
QuestionOpinions needed on "shared" keyword Pin
nlarson1112-Jan-12 8:05
nlarson1112-Jan-12 8:05 
AnswerRe: Opinions needed on "shared" keyword Pin
Luc Pattyn12-Jan-12 8:16
sitebuilderLuc Pattyn12-Jan-12 8:16 
For starters, Shared is over-used.

You can (and should) use Shared on methods that perform a state-less operation, e.g. mathematical functions Math.Abs and Math.Sin

You could have a Shared method that say increments a counter inside a database, provided the whole operation is contained in the method.

And you can create a class that is entirely Shared (all its data members and methods are Shared) provided it represents a unique object, something you are sure you never will need more than one instance of. Not too many real-life objects would fill that description though, most things aren't unique (although they may start of as a unique instance, e.g. your app may currently have access to only one database, however that might change in the future).

Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum

GeneralRe: Opinions needed on "shared" keyword Pin
nlarson1112-Jan-12 8:21
nlarson1112-Jan-12 8:21 
GeneralRe: Opinions needed on "shared" keyword Pin
Dave Kreskowiak12-Jan-12 8:32
mveDave Kreskowiak12-Jan-12 8:32 
GeneralRe: Opinions needed on "shared" keyword Pin
nlarson1112-Jan-12 8:38
nlarson1112-Jan-12 8:38 
GeneralRe: Opinions needed on "shared" keyword Pin
Dave Kreskowiak12-Jan-12 9:38
mveDave Kreskowiak12-Jan-12 9:38 
GeneralRe: Opinions needed on "shared" keyword Pin
Luc Pattyn12-Jan-12 8:34
sitebuilderLuc Pattyn12-Jan-12 8:34 
GeneralRe: Opinions needed on "shared" keyword Pin
nlarson1112-Jan-12 8:51
nlarson1112-Jan-12 8:51 
AnswerRe: Opinions needed on "shared" keyword Pin
Eddy Vluggen12-Jan-12 10:40
professionalEddy Vluggen12-Jan-12 10:40 
GeneralRe: Opinions needed on "shared" keyword Pin
nlarson1113-Jan-12 2:44
nlarson1113-Jan-12 2:44 
GeneralRe: Opinions needed on "shared" keyword Pin
Eddy Vluggen13-Jan-12 6:34
professionalEddy Vluggen13-Jan-12 6:34 
QuestionDynamic dropdowns enable without post back Pin
byka12-Jan-12 6:31
byka12-Jan-12 6:31 
AnswerRe: Dynamic dropdowns enable without post back Pin
DannyStaten12-Jan-12 10:39
DannyStaten12-Jan-12 10:39 
QuestionChanging default value of a property of a control (DataGridView). Pin
priyamtheone12-Jan-12 3:16
priyamtheone12-Jan-12 3:16 
Answere: Changing default value of a property of a control (DataGridView). Pin
Simon_Whale12-Jan-12 3:41
Simon_Whale12-Jan-12 3:41 
QuestionRe: e: Changing default value of a property of a control (DataGridView). Pin
priyamtheone14-Jan-12 3:27
priyamtheone14-Jan-12 3:27 
AnswerRe: Changing default value of a property of a control (DataGridView). Pin
Wayne Gaylard12-Jan-12 3:47
professionalWayne Gaylard12-Jan-12 3:47 
QuestionDirectShowLib Adjust Camera Brightness Pin
ggoutam711-Jan-12 17:31
ggoutam711-Jan-12 17:31 
QuestionVB2010 Serial Port Tutorial? Pin
JDBravo11-Jan-12 9:19
JDBravo11-Jan-12 9:19 

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.