D
Doychin Bondzhev
Is it posible to override a property in descendant class with different
type?
here is a simple example of what I'm trying to do:
using System;
using System.Windows.Forms;
namespace ClassLibrary1
{
/// <summary>
/// Summary description for Class1.
/// </summary>
public class TestControl: Control
{
private String m_Visble;
public TestControl()
{
//
// TODO: Add constructor logic here
//
m_Visble = "Yes";
}
public new String Visible
{
get
{
return m_Visble;
}
set
{
m_Visble = value;
}
}
}
}
After building this code I can add ths control to the toolbox and also I can place it on the form but Property grid does not work properly with it.
Is this a bug in Property grid or there is somthing that I miss here?
also if this is not the right group for such question where should I post it?
thanks in advance.
type?
here is a simple example of what I'm trying to do:
using System;
using System.Windows.Forms;
namespace ClassLibrary1
{
/// <summary>
/// Summary description for Class1.
/// </summary>
public class TestControl: Control
{
private String m_Visble;
public TestControl()
{
//
// TODO: Add constructor logic here
//
m_Visble = "Yes";
}
public new String Visible
{
get
{
return m_Visble;
}
set
{
m_Visble = value;
}
}
}
}
After building this code I can add ths control to the toolbox and also I can place it on the form but Property grid does not work properly with it.
Is this a bug in Property grid or there is somthing that I miss here?
also if this is not the right group for such question where should I post it?
thanks in advance.