Click here to Skip to main content
15,890,717 members
Home / Discussions / C#
   

C#

 
JokeRe: need help Pin
SeMartens9-Jul-09 21:55
SeMartens9-Jul-09 21:55 
GeneralRe: need help Pin
mjawadkhatri10-Jul-09 0:29
mjawadkhatri10-Jul-09 0:29 
AnswerRe: need help Pin
K03069-Jul-09 21:39
K03069-Jul-09 21:39 
Answer== and .Equals() are different. Pin
Nagy Vilmos9-Jul-09 22:19
professionalNagy Vilmos9-Jul-09 22:19 
QuestionHow can I encrypt to message in WCF? Pin
dataminers9-Jul-09 20:40
dataminers9-Jul-09 20:40 
AnswerRe: How can I encrypt to message in WCF? Pin
SeMartens9-Jul-09 21:09
SeMartens9-Jul-09 21:09 
AnswerRe: How can I encrypt to message in WCF? Pin
SeMartens9-Jul-09 21:10
SeMartens9-Jul-09 21:10 
QuestionModified TextBox property not persisting in designer Pin
SillyPants9-Jul-09 19:51
SillyPants9-Jul-09 19:51 
I made the following class:

public class MyTextBox : TextBox
{
private int _IntVariable = int.MaxValue;
private myEnum _EnumVariable;

public MyTextBox()
{

}

public int IntVariable
{
get {return _IntVariable;}
set {_IntVariable = value;}
}
public myEnum EnumVariable
{
get {return _EnumVariable;}
set {_EnumVariable = value;}
}
}

When I create a user control and place a "MyTextBox" control on the user control, I name it txtName and set the IntVariable to 7 and the designer shows 7. Then, when I build the solution again, the value shown in the designer resets to the maximum value of an integer while the code in the InitializeComponent() method still shows : this.txtName.IntVariable = 7;.

However, the enumeration property can be set and it persists when the solution is re-built, the UserControl is closed and re-opened in the designer, or Visual Studio is closed and re-opened and the solution re-opened.

Can anyone explain why the integer property is not persisting and the enumeration property is and if there is anything I can do to make the integer property persist in the designer?
AnswerRe: Modified TextBox property not persisting in designer Pin
DaveyM699-Jul-09 22:39
professionalDaveyM699-Jul-09 22:39 
QuestionOver Lay Image Pin
satsumatable9-Jul-09 19:27
satsumatable9-Jul-09 19:27 
AnswerRe: Over Lay Image Pin
dan!sh 9-Jul-09 19:31
professional dan!sh 9-Jul-09 19:31 
QuestionTo open a new file Pin
Rupaa9-Jul-09 19:18
Rupaa9-Jul-09 19:18 
AnswerRe: To open a new file Pin
MumbleB9-Jul-09 19:22
MumbleB9-Jul-09 19:22 
AnswerRe: To open a new file Pin
0x3c09-Jul-09 19:40
0x3c09-Jul-09 19:40 
AnswerRe: To open a new file Pin
Huxley Stronghead10-Jul-09 1:15
Huxley Stronghead10-Jul-09 1:15 
Questioni want to write an application use sanner Pin
nghia.VKS@gmail.com9-Jul-09 18:38
nghia.VKS@gmail.com9-Jul-09 18:38 
AnswerRe: i want to write an application use sanner Pin
_Maxxx_9-Jul-09 19:00
professional_Maxxx_9-Jul-09 19:00 
JokeRe: i want to write an application use sanner Pin
himanshu25619-Jul-09 19:03
himanshu25619-Jul-09 19:03 
JokeRe: i want to write an application use sanner Pin
dan!sh 9-Jul-09 19:05
professional dan!sh 9-Jul-09 19:05 
GeneralRe: i want to write an application use sanner Pin
MumbleB9-Jul-09 19:23
MumbleB9-Jul-09 19:23 
GeneralRe: i want to write an application use sanner Pin
dan!sh 9-Jul-09 19:28
professional dan!sh 9-Jul-09 19:28 
AnswerRe: i want to write an application use sanner Pin
vaghelabhavesh9-Jul-09 20:37
vaghelabhavesh9-Jul-09 20:37 
QuestionTaking variables from other classes. Pin
nik1219-Jul-09 17:02
nik1219-Jul-09 17:02 
AnswerRe: Taking variables from other classes. Pin
N a v a n e e t h9-Jul-09 17:06
N a v a n e e t h9-Jul-09 17:06 
GeneralRe: Taking variables from other classes. Pin
nik1219-Jul-09 17:12
nik1219-Jul-09 17:12 

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.