Inconsistent accessibility: property type X is less accessible than property Y
Posted on 2006-03-23
I am trying to add the C# event below to a custom control. However I am getting the follwing error, please help.
Inconsistent accessibility: property type 'CA.UI.CustomControls.uccPostalCodeSearchEditor.SelectedItemHandler' is less accessible than property 'CA.UI.CustomControls.uccPostalCodeSearchEditor.SelectedItem'
//Definitions for the SelectedItem Event
//SelectedItem event is raised when the user selects a Record.
delegate void SelectedItemHandler(object sender, PostalCodeSearchEditorSelectedEventArgs e);
private SelectedItemHandler SelectedItemEvent;
public event SelectedItemHandler SelectedItem
SelectedItemEvent = (SelectedItemHandler) System.Delegate.Combine(SelectedItemEvent, value);
SelectedItemEvent = (SelectedItemHandler) System.Delegate.Remove(SelectedItemEvent, value);
} // END: public event SelectedItemHandler SelectedItem
Also below is the working VB code:
Delegate Sub SelectedItemHandler(ByVal sender As Object, ByVal e As PostalCodeSearchEditorSelectedEventArgs)
Public Event SelectedItem As SelectedItemHandler