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.Mai nContainer.Bill EventRedrawComp lete' 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 BillEventRedraw Complete();
[Guid("A10D9EF1-508C-40b9-8B17-69E14CC08E3A")]
[ProgId("EMIS.PC S.BillingModule .MainContainer" )]
[ClassInterface( ClassInterfaceT ype.None)]
public class MainContainer : System.Windows. Forms.UserContr ol
{
#region Custom Events
public static event BillEventRedraw Complete
BillEventRedraw Complete;
#endregion Custom Events
/... etc etc etc
then in another class,
namespace TestClassB
{
public class BillingEvent : UserControl, IBillingModule,
IBillingEvent
{
private void BillingEvent_Lo ad(object sender, EventArgs e)
{
MainContainer.B illEventRedrawC omplete += new
BillEventRedraw Complete(MainCo ntainer_BillEve ntRedrawComplet e);
}
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.Mai nContainer.Bill EventRedrawComp lete' 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 BillEventRedraw Complete();
[Guid("A10D9EF1-508C-40b9-8B17-69E14CC08E3A")]
[ProgId("EMIS.PC S.BillingModule .MainContainer" )]
[ClassInterface( ClassInterfaceT ype.None)]
public class MainContainer : System.Windows. Forms.UserContr ol
{
#region Custom Events
public static event BillEventRedraw Complete
BillEventRedraw Complete;
#endregion Custom Events
/... etc etc etc
then in another class,
namespace TestClassB
{
public class BillingEvent : UserControl, IBillingModule,
IBillingEvent
{
private void BillingEvent_Lo ad(object sender, EventArgs e)
{
MainContainer.B illEventRedrawC omplete += new
BillEventRedraw Complete(MainCo ntainer_BillEve ntRedrawComplet e);
}
etc etc etc
Comment