Click here to Skip to main content
15,894,539 members
Home / Discussions / C#
   

C#

 
GeneralRe: Problem about Properties Pin
kcynic1-Aug-07 2:43
kcynic1-Aug-07 2:43 
GeneralRe: Problem about Properties Pin
kubben1-Aug-07 2:46
kubben1-Aug-07 2:46 
GeneralRe: Problem about Properties Pin
kcynic1-Aug-07 3:16
kcynic1-Aug-07 3:16 
AnswerRe: Problem about Properties Pin
collapo1-Aug-07 1:59
collapo1-Aug-07 1:59 
GeneralRe: Problem about Properties Pin
kcynic1-Aug-07 2:06
kcynic1-Aug-07 2:06 
AnswerRe: Problem about Properties Pin
Martin#1-Aug-07 2:04
Martin#1-Aug-07 2:04 
GeneralRe: Problem about Properties Pin
kcynic1-Aug-07 2:52
kcynic1-Aug-07 2:52 
GeneralRe: Problem about Properties Pin
Martin#1-Aug-07 2:58
Martin#1-Aug-07 2:58 
Hello!

I don't think there is a nicer solution for that.
You would have to set a bool Flag for every property, to see if it was initialized.
Which is dirty, and if you use the "[DefaultValue(1)]" Attribute (which would be good practice, as it is not neccessary that the designer adds code for a property which doesn't change it's value), it would not work!

I would recommend to go threw my example again, add your validation from the setter of your property to the method, and call this method if the EndInit flag is true.

All the best,

Martin

AnswerRe: Problem about Properties Pin
Luc Pattyn1-Aug-07 2:37
sitebuilderLuc Pattyn1-Aug-07 2:37 
GeneralRe: Problem about Properties Pin
kcynic1-Aug-07 2:46
kcynic1-Aug-07 2:46 
GeneralRe: Problem about Properties Pin
Luc Pattyn1-Aug-07 2:59
sitebuilderLuc Pattyn1-Aug-07 2:59 
GeneralRe: Problem about Properties Pin
Malcolm Smart1-Aug-07 2:59
Malcolm Smart1-Aug-07 2:59 
GeneralRe: Problem about Properties Pin
Luc Pattyn1-Aug-07 3:42
sitebuilderLuc Pattyn1-Aug-07 3:42 
GeneralRe: Problem about Properties Pin
Malcolm Smart1-Aug-07 4:53
Malcolm Smart1-Aug-07 4:53 
AnswerRe: Problem about Properties Pin
Scott Dorman1-Aug-07 13:38
professionalScott Dorman1-Aug-07 13:38 
GeneralRe: Problem about Properties Pin
kcynic2-Aug-07 18:27
kcynic2-Aug-07 18:27 
QuestionCall To SNMP Device Pin
kaushal6541-Aug-07 1:24
kaushal6541-Aug-07 1:24 
QuestionProblem printing images on Zebra Printer Pin
Sharath Madhuranath1-Aug-07 1:22
Sharath Madhuranath1-Aug-07 1:22 
AnswerRe: Problem printing images on Zebra Printer Pin
kubben1-Aug-07 2:01
kubben1-Aug-07 2:01 
QuestionHow to optimize remove unused entries in resx ? Pin
stancrm1-Aug-07 1:20
stancrm1-Aug-07 1:20 
Questionrun application ? Pin
abcomp011-Aug-07 0:55
abcomp011-Aug-07 0:55 
AnswerRe: run application ? Pin
kubben1-Aug-07 2:02
kubben1-Aug-07 2:02 
QuestionAdding TLB to - Debug\Interop ? ? Pin
Yanshof1-Aug-07 0:51
Yanshof1-Aug-07 0:51 
QuestionRe:Disabling maximising form by doubleclicking on winform header Pin
kyreddy1-Aug-07 0:36
kyreddy1-Aug-07 0:36 
AnswerRe:Disabling maximising form by doubleclicking on winform header [modified] Pin
Martin#1-Aug-07 0:58
Martin#1-Aug-07 0:58 

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.