Click here to Skip to main content
15,896,118 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionlistview Pin
johnny19639-Jan-07 21:01
johnny19639-Jan-07 21:01 
AnswerRe: listview Pin
johnny196310-Jan-07 0:45
johnny196310-Jan-07 0:45 
GeneralRe: listview Pin
johnny196311-Jan-07 6:58
johnny196311-Jan-07 6:58 
Questionglobalization/localization Pin
tawiskid099-Jan-07 19:50
tawiskid099-Jan-07 19:50 
AnswerRe: globalization/localization Pin
testy_proconsul9-Jan-07 21:24
testy_proconsul9-Jan-07 21:24 
QuestionGet and Set property in vb.net Pin
amaneet9-Jan-07 19:24
amaneet9-Jan-07 19:24 
AnswerRe: Get and Set property in vb.net Pin
Christian Graus9-Jan-07 20:24
protectorChristian Graus9-Jan-07 20:24 
AnswerRe: Get and Set property in vb.net Pin
Guffa9-Jan-07 22:51
Guffa9-Jan-07 22:51 
One reason is isolation, which is a key part of object orientation.

You isolate the storage of the data from the action of accessing the data. That means that you can change the way that the data is stored without having to rewrite all code that uses the data.

Another reason is protection, which is another key part of object orientation.

You can make the propery read only if it shouldn't be changed directly. You can add logic to verify that the value is legal before setting it. You can add locking for thread safety.


The increase of lines in the code is not a problem, apart from the added typing. In the release compile the code in the property will be optimized away if you haven't added any extra logic.

If you were afraid of typing you wouldn't use Visual Basi-Cobol anyway. Wink | ;)

---
Year happy = new Year(2007);

AnswerRe: Get and Set property in vb.net Pin
Dave Kreskowiak10-Jan-07 5:09
mveDave Kreskowiak10-Jan-07 5:09 
QuestionI want to get the .txt and .Doc file's contents. Pin
somagunasekaran9-Jan-07 19:08
somagunasekaran9-Jan-07 19:08 
AnswerRe: I want to get the .txt and .Doc file's contents. Pin
Christian Graus9-Jan-07 20:27
protectorChristian Graus9-Jan-07 20:27 
GeneralRe: I want to get the .txt and .Doc file's contents. Pin
somagunasekaran9-Jan-07 23:33
somagunasekaran9-Jan-07 23:33 
GeneralRe: I want to get the .txt and .Doc file's contents. Pin
Christian Graus10-Jan-07 0:22
protectorChristian Graus10-Jan-07 0:22 
QuestionMy.Settings question Pin
sa_runner9-Jan-07 19:06
sa_runner9-Jan-07 19:06 
AnswerRe: My.Settings question Pin
Johan Hakkesteegt11-Jan-07 3:37
Johan Hakkesteegt11-Jan-07 3:37 
Questiondatabase tables search in vb.net Pin
amaneet9-Jan-07 18:42
amaneet9-Jan-07 18:42 
AnswerRe: database tables search in vb.net Pin
testy_proconsul10-Jan-07 0:00
testy_proconsul10-Jan-07 0:00 
GeneralRe: database tables search in vb.net Pin
amaneet10-Jan-07 0:35
amaneet10-Jan-07 0:35 
GeneralRe: database tables search in vb.net Pin
testy_proconsul10-Jan-07 1:25
testy_proconsul10-Jan-07 1:25 
QuestionStrange FileWatch problem? Pin
rudemusik9-Jan-07 18:00
rudemusik9-Jan-07 18:00 
AnswerRe: Strange FileWatch problem? Pin
Johan Hakkesteegt11-Jan-07 3:28
Johan Hakkesteegt11-Jan-07 3:28 
GeneralRe: Strange FileWatch problem? Pin
rudemusik11-Jan-07 7:05
rudemusik11-Jan-07 7:05 
QuestionHow to redirect IP..? Pin
stupix9-Jan-07 16:45
stupix9-Jan-07 16:45 
AnswerRe: How to redirect IP..? Pin
Dave Kreskowiak9-Jan-07 17:25
mveDave Kreskowiak9-Jan-07 17:25 
GeneralRe: How to redirect IP..? Pin
stupix9-Jan-07 18:07
stupix9-Jan-07 18:07 

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.