Click here to Skip to main content
15,911,896 members
Home / Discussions / C#
   

C#

 
GeneralRe: Code is Rounding Down instead of Rounding Up Pin
Richard MacCutchan9-Mar-10 7:38
mveRichard MacCutchan9-Mar-10 7:38 
GeneralRe: Code is Rounding Down instead of Rounding Up Pin
Luc Pattyn9-Mar-10 9:41
sitebuilderLuc Pattyn9-Mar-10 9:41 
AnswerRe: Code is Rounding Down instead of Rounding Up Pin
Rob Philpott9-Mar-10 6:10
Rob Philpott9-Mar-10 6:10 
AnswerRe: Code is Rounding Down instead of Rounding Up Pin
suprsnipes9-Mar-10 21:41
suprsnipes9-Mar-10 21:41 
QuestionPasspoint: Robust Discretization Pin
einsteinmow9-Mar-10 3:17
einsteinmow9-Mar-10 3:17 
AnswerRe: Passpoint: Robust Discretization Pin
R. Giskard Reventlov9-Mar-10 4:08
R. Giskard Reventlov9-Mar-10 4:08 
GeneralRe: Passpoint: Robust Discretization Pin
EliottA9-Mar-10 5:05
EliottA9-Mar-10 5:05 
QuestionDataBinding issue Pin
GDavy9-Mar-10 3:17
GDavy9-Mar-10 3:17 
Hello people,
I have the following problem.
I have a class with a property like in the below example:
class myClass:INotifyPropertyChanged
{
private string theProp;

public string TheProp
{
  get{ return theProp; }
  set
  {
   if( string.IsNullOrEmpty(value) )
      theProp = "Another Value";
   else
      theProp = value;
   NotifyPropertyChanged("TheProp");
  }
}
/// And a lot of other stuff
}


So in case an empty or null is set I set the internal value of the property to a default string.
The object is doing this just fine. But the problem I have is with a textBox that is bound to this property. When I delete the text in the textbox, the textbox does not represent the different value.
Probably I'm doing something wrong with the binding, it seems like a common way to set a different value, so I suppose there must be a way to make this work.

thanks for any help you might provide.

Davy
AnswerRe: DataBinding issue Pin
darkelv9-Mar-10 4:06
darkelv9-Mar-10 4:06 
GeneralRe: DataBinding issue Pin
GDavy9-Mar-10 20:06
GDavy9-Mar-10 20:06 
QuestionC# database connection Pin
2010JohnFByers9-Mar-10 3:15
2010JohnFByers9-Mar-10 3:15 
AnswerRe: C# database connection Pin
PIEBALDconsult9-Mar-10 3:31
mvePIEBALDconsult9-Mar-10 3:31 
AnswerRe: C# database connection Pin
R. Giskard Reventlov9-Mar-10 4:07
R. Giskard Reventlov9-Mar-10 4:07 
GeneralRe: C# database connection Pin
Mirko19809-Mar-10 6:16
Mirko19809-Mar-10 6:16 
GeneralRe: C# database connection Pin
2010JohnFByers10-Mar-10 5:36
2010JohnFByers10-Mar-10 5:36 
Questionbeginner question: foreach .. else? Pin
Ted On The Net9-Mar-10 2:02
Ted On The Net9-Mar-10 2:02 
AnswerRe: beginner question: foreach .. else? Pin
harold aptroot9-Mar-10 2:07
harold aptroot9-Mar-10 2:07 
AnswerRe: beginner question: foreach .. else? Pin
kevinnicol9-Mar-10 2:19
kevinnicol9-Mar-10 2:19 
GeneralRe: beginner question: foreach .. else? Pin
Ted On The Net9-Mar-10 3:24
Ted On The Net9-Mar-10 3:24 
GeneralRe: beginner question: foreach .. else? Pin
riced9-Mar-10 11:35
riced9-Mar-10 11:35 
AnswerRe: beginner question: foreach .. else? [modified] Pin
Paulo Zemek9-Mar-10 3:28
Paulo Zemek9-Mar-10 3:28 
GeneralRe: beginner question: foreach .. else? Pin
harold aptroot9-Mar-10 4:19
harold aptroot9-Mar-10 4:19 
AnswerRe: beginner question: foreach .. else? Pin
StarBP10-Mar-10 10:05
StarBP10-Mar-10 10:05 
QuestionFind in memory string another process Pin
pawel_19809-Mar-10 2:00
pawel_19809-Mar-10 2:00 
GeneralRe: Find in memory string another process Pin
harold aptroot9-Mar-10 2:09
harold aptroot9-Mar-10 2:09 

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.