Click here to Skip to main content
15,921,203 members
Home / Discussions / C#
   

C#

 
AnswerRe: Validating Email Address Pin
sam#6-Mar-07 20:35
sam#6-Mar-07 20:35 
AnswerRe: Validating Email Address Pin
goldli6-Mar-07 21:07
goldli6-Mar-07 21:07 
AnswerRe: Validating Email Address Pin
Wayne Phipps6-Mar-07 21:12
Wayne Phipps6-Mar-07 21:12 
AnswerRe: Validating Email Address Pin
Scott Dorman8-Mar-07 17:31
professionalScott Dorman8-Mar-07 17:31 
QuestionMDI and OutOfMemoryException and CreateHandle() Pin
sarang.chandaikar6-Mar-07 20:15
sarang.chandaikar6-Mar-07 20:15 
AnswerRe: MDI and OutOfMemoryException and CreateHandle() Pin
VirtualVoid.NET7-Mar-07 1:26
VirtualVoid.NET7-Mar-07 1:26 
QuestionCloning object with properties Pin
Priya09026-Mar-07 19:57
Priya09026-Mar-07 19:57 
AnswerRe: Cloning object with properties Pin
Martin#6-Mar-07 20:20
Martin#6-Mar-07 20:20 
Hello,
PropertyDescriptorCollection pdcoldControl = TypeDescriptor.GetProperties(oldControl);
PropertyDescriptorCollection pdcnewControl = TypeDescriptor.GetProperties(newControl);
 
foreach(PropertyDescriptor pdoldControl in pdcoldControl)
{ //Here you should define some rules like this:
  if((pdoldControl.Attributes.Contains(CategoryAttribute.Appearance) && pdoldControl.IsBrowsable)
  || (pdoldControl.Attributes.Contains(CategoryAttribute.Behavior) && pdoldControl.IsBrowsable && pdoldControl.IsReadOnly==false))
  {
    PropertyDescriptor pdnewControl = pdcnewControl[pdoldControl.Name];
    pdnewControl.SetValue(newControl,pdoldControl.GetValue(oldControl));
  }
}
TypeDescriptor.Refresh(oldControl);
TypeDescriptor.Refresh(newControl);
 
//set some additional properties, like this:
newControl.Size = oldControl.Size;
newControl.Text = oldControl.Text;

Hope it helps!

All the best,

Martin
QuestionRe: Cloning object with properties Pin
Priya09028-Mar-07 1:33
Priya09028-Mar-07 1:33 
AnswerRe: Cloning object with properties Pin
Martin#8-Mar-07 2:46
Martin#8-Mar-07 2:46 
QuestionHow to make a listview looks like the windows explorer? Pin
goldli6-Mar-07 19:54
goldli6-Mar-07 19:54 
AnswerRe: How to make a listview looks like the windows explorer? Pin
VirtualVoid.NET7-Mar-07 1:28
VirtualVoid.NET7-Mar-07 1:28 
Questionhow to restrict Copy and Paste in textbox control Pin
AR Reddy6-Mar-07 19:45
AR Reddy6-Mar-07 19:45 
AnswerRe: how to restrict Copy and Paste in textbox control Pin
Omkar Ghaisas6-Mar-07 19:55
Omkar Ghaisas6-Mar-07 19:55 
AnswerRe: how to restrict Copy and Paste in textbox control Pin
Navi156-Mar-07 20:08
Navi156-Mar-07 20:08 
QuestionInstantiating a Value Type in .NET Pin
Omkar Ghaisas6-Mar-07 19:29
Omkar Ghaisas6-Mar-07 19:29 
AnswerRe: Instantiating a Value Type in .NET Pin
Not Active6-Mar-07 20:08
mentorNot Active6-Mar-07 20:08 
GeneralRe: Instantiating a Value Type in .NET Pin
Omkar Ghaisas6-Mar-07 20:11
Omkar Ghaisas6-Mar-07 20:11 
GeneralRe: Instantiating a Value Type in .NET Pin
sam#6-Mar-07 20:45
sam#6-Mar-07 20:45 
GeneralRe: Instantiating a Value Type in .NET Pin
Colin Angus Mackay6-Mar-07 21:23
Colin Angus Mackay6-Mar-07 21:23 
GeneralRe: Instantiating a Value Type in .NET Pin
Not Active7-Mar-07 3:26
mentorNot Active7-Mar-07 3:26 
AnswerRe: Instantiating a Value Type in .NET Pin
Matthew Cuba7-Mar-07 1:09
Matthew Cuba7-Mar-07 1:09 
Questionlooking for guidelines about c# Pin
priychai6-Mar-07 19:09
priychai6-Mar-07 19:09 
AnswerRe: looking for guidelines about c# Pin
Sandeep Akhare6-Mar-07 19:59
Sandeep Akhare6-Mar-07 19:59 
AnswerRe: looking for guidelines about c# Pin
Colin Angus Mackay6-Mar-07 21:26
Colin Angus Mackay6-Mar-07 21:26 

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.