P
Peted
Hi
Im using vs2008 c# 3.0 and am going through some other person(s) code
to clean up compiler warnings that are bieng produced.
I have this code (at bottom)
where a delegate/event is defined
and it builds ok with no errors but im trying to get rid of the
compiler warnings. The warning in this case is
Warning 35 The event
'TestCLassA.MainContainer.BillEventRedrawComplete' is never used
You can see from the code it is used but in a different class, not
seen at build time.
Im wondering if there is a way to make the warning go away, can i
intialise it, in some throw away fassion just to remove the warning.
If this was a simple car like an int thats what i would do.
I dont want to disbale warnings in the compiler, can anyone suggest
what i can do to remove this warning on build of this code
thanks for any help
Peted
namespace TestClassA
{
public delegate void BillEventRedrawComplete();
[Guid("A10D9EF1-508C-40b9-8B17-69E14CC08E3A")]
[ProgId("EMIS.PCS.BillingModule.MainContainer")]
[ClassInterface(ClassInterfaceType.None)]
public class MainContainer : System.Windows.Forms.UserControl
{
#region Custom Events
public static event BillEventRedrawComplete
BillEventRedrawComplete;
#endregion Custom Events
/... etc etc etc
then in another class,
namespace TestClassB
{
public class BillingEvent : UserControl, IBillingModule,
IBillingEvent
{
private void BillingEvent_Load(object sender, EventArgs e)
{
MainContainer.BillEventRedrawComplete += new
BillEventRedrawComplete(MainContainer_BillEventRedrawComplete);
}
etc etc etc
Im using vs2008 c# 3.0 and am going through some other person(s) code
to clean up compiler warnings that are bieng produced.
I have this code (at bottom)
where a delegate/event is defined
and it builds ok with no errors but im trying to get rid of the
compiler warnings. The warning in this case is
Warning 35 The event
'TestCLassA.MainContainer.BillEventRedrawComplete' is never used
You can see from the code it is used but in a different class, not
seen at build time.
Im wondering if there is a way to make the warning go away, can i
intialise it, in some throw away fassion just to remove the warning.
If this was a simple car like an int thats what i would do.
I dont want to disbale warnings in the compiler, can anyone suggest
what i can do to remove this warning on build of this code
thanks for any help
Peted
namespace TestClassA
{
public delegate void BillEventRedrawComplete();
[Guid("A10D9EF1-508C-40b9-8B17-69E14CC08E3A")]
[ProgId("EMIS.PCS.BillingModule.MainContainer")]
[ClassInterface(ClassInterfaceType.None)]
public class MainContainer : System.Windows.Forms.UserControl
{
#region Custom Events
public static event BillEventRedrawComplete
BillEventRedrawComplete;
#endregion Custom Events
/... etc etc etc
then in another class,
namespace TestClassB
{
public class BillingEvent : UserControl, IBillingModule,
IBillingEvent
{
private void BillingEvent_Load(object sender, EventArgs e)
{
MainContainer.BillEventRedrawComplete += new
BillEventRedrawComplete(MainContainer_BillEventRedrawComplete);
}
etc etc etc