[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 546
  • Last Modified:

How do I extend the checkbox class and add another string property in C# while maintaining the other pieces of the checkbox class?

How do I extend the checkbox class and add another string property in C# while maintaining the other pieces of the checkbox class?

   public class FilterCheckbox {
      private string attributeID = string.Empty;
      public string AttributeID {
         get { return attributeID; }
         set { attributeID = value; }
      }
   }

I want to have this extra value attributeID added to the checkbox class but when I replace a checkbox with this new class, the new class doesn't have all the other codesense properties or methods that the checkbox has, it only has the AttributeID. How do I get the others?
0
jbrahy
Asked:
jbrahy
1 Solution
 
bele04Commented:
you can create a class and extend the checkbox class like this:
public class FilterCheckbox : CheckBox
{
private string attributeID;
}

this way you'll have all the properties of the checkbox  + your own custom properties.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now