Click here to Skip to main content
15,914,780 members
Home / Discussions / C#
   

C#

 
QuestionHow do you get the "dockable" icon on forms/controls? Pin
TheBlindWatchmaker30-Nov-05 10:51
TheBlindWatchmaker30-Nov-05 10:51 
AnswerRe: How do you get the "dockable" icon on forms/controls? Pin
Judah Gabriel Himango30-Nov-05 11:08
sponsorJudah Gabriel Himango30-Nov-05 11:08 
GeneralRe: How do you get the "dockable" icon on forms/controls? Pin
TheBlindWatchmaker30-Nov-05 13:43
TheBlindWatchmaker30-Nov-05 13:43 
QuestionVariable Name Pin
saborchulo30-Nov-05 10:41
saborchulo30-Nov-05 10:41 
AnswerRe: Variable Name Pin
Turtle Hand30-Nov-05 10:43
Turtle Hand30-Nov-05 10:43 
GeneralRe: Variable Name Pin
Judah Gabriel Himango30-Nov-05 11:12
sponsorJudah Gabriel Himango30-Nov-05 11:12 
AnswerRe: Variable Name Pin
Judah Gabriel Himango30-Nov-05 11:11
sponsorJudah Gabriel Himango30-Nov-05 11:11 
Questionissue of getting the names of all dial-up connections on a given system with API RasEnumEntries Pin
Vlada Nesic30-Nov-05 9:47
Vlada Nesic30-Nov-05 9:47 
QuestionResxResourceWriter not available Pin
malharone30-Nov-05 7:56
malharone30-Nov-05 7:56 
AnswerRe: ResxResourceWriter not available Pin
Dave Kreskowiak30-Nov-05 9:37
mveDave Kreskowiak30-Nov-05 9:37 
GeneralRe: ResxResourceWriter not available Pin
malharone30-Nov-05 10:00
malharone30-Nov-05 10:00 
GeneralRe: ResxResourceWriter not available Pin
Dave Kreskowiak30-Nov-05 10:42
mveDave Kreskowiak30-Nov-05 10:42 
GeneralRe: ResxResourceWriter not available Pin
malharone30-Nov-05 10:51
malharone30-Nov-05 10:51 
QuestionDesign question Pin
Stefan Troschuetz30-Nov-05 7:51
Stefan Troschuetz30-Nov-05 7:51 
AnswerRe: Design question Pin
ventomito30-Nov-05 9:07
ventomito30-Nov-05 9:07 
AnswerRe: Design question Pin
Stan Shannon30-Nov-05 9:32
Stan Shannon30-Nov-05 9:32 
GeneralRe: Design question Pin
Stefan Troschuetz30-Nov-05 23:39
Stefan Troschuetz30-Nov-05 23:39 
At first thanks for the answer.
The class I'm writing is part of a class library, so the variable may be exposed to the user via GUI but didn't necessarily have to. So I'm searching for a way, to let an user of the class check for validity of an assigned value no matter if it happens directly in code or via GUI. Currently I favor the following solution:
public double Alpha
{  
  set  
  {    
    if (value <= 0)
      throw new ArgumentOutOfRangeException("Assigned value has to be greater 0");

    this.alpha = value;
  }
}
public bool IsValidAlpha(double value)
{
    return value > 0;
}
}

//User of the class then can do
if (obj.IsValidAlpha(1.0))
  obj.Alpha = 1.0;
else
  ...








www.troschuetz.de

-- modified at 5:41 Thursday 1st December, 2005
AnswerRe: Design question Pin
WillemM30-Nov-05 21:56
WillemM30-Nov-05 21:56 
GeneralRe: Design question Pin
Stefan Troschuetz30-Nov-05 23:43
Stefan Troschuetz30-Nov-05 23:43 
GeneralRe: Design question Pin
Dan Neely1-Dec-05 3:23
Dan Neely1-Dec-05 3:23 
GeneralRe: Design question Pin
Stefan Troschuetz1-Dec-05 4:02
Stefan Troschuetz1-Dec-05 4:02 
QuestionCannot combine ref and params!!! What to do? Pin
smurfy3430-Nov-05 7:39
smurfy3430-Nov-05 7:39 
AnswerRe: Cannot combine ref and params!!! What to do? Pin
Judah Gabriel Himango30-Nov-05 11:17
sponsorJudah Gabriel Himango30-Nov-05 11:17 
QuestionReading specific bit values from a file. Pin
Jim Taylor30-Nov-05 7:26
Jim Taylor30-Nov-05 7:26 
AnswerRe: Reading specific bit values from a file. Pin
Christian Graus30-Nov-05 14:05
protectorChristian Graus30-Nov-05 14:05 

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.