PC Review


Reply
Thread Tools Rate Thread

Can i comment out "private System.ComponentModel.Container components = null;" to avoid warning in wizard generated code?

 
 
Daniel
Guest
Posts: n/a
 
      16th Jul 2004
When ever I add a projectinstaller to a C# windows service the wizard
generated code causes this compile time warning:
C:\foo\foo\ProjectInstaller.cs(21): The private field
'foo.ProjectInstaller.components' is never used -- Is it safe to resolve
this by just commenting out "private System.ComponentModel.Container
components = null;" from the ProjectInitiallizer.cs?


 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      16th Jul 2004
"Daniel" <(E-Mail Removed)> wrote in message
news:OQr%(E-Mail Removed)...
> When ever I add a projectinstaller to a C# windows service the wizard
> generated code causes this compile time warning:
> C:\foo\foo\ProjectInstaller.cs(21): The private field
> 'foo.ProjectInstaller.components' is never used -- Is it safe to resolve
> this by just commenting out "private System.ComponentModel.Container
> components = null;" from the ProjectInitiallizer.cs?


I usually add "components = components;"
--
John Saunders
johnwsaundersiii at hotmail


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filtering auto-generated code from "Treat Warnings as Errors" and "XML Comments" Skip Sailors Microsoft C# .NET 1 9th Jun 2006 08:26 PM
Anyone ever seen this "System.ComponentModel.Win32Exception: Access is denied Exception." Microsoft News Microsoft Dot NET Framework 0 4th Nov 2005 11:44 PM
Anyone ever seen this "System.ComponentModel.Win32Exception: Access is denied Exception." Microsoft News Microsoft VB .NET 3 2nd Nov 2005 09:49 PM
Keep getting "Error creating window handle" System.ComponentModel.Win32Exception for unknown reason Hasani Microsoft Dot NET Framework Forms 1 22nd Nov 2003 07:30 AM
private System.ComponentModel.IContainer components; Edward Yang Microsoft C# .NET 2 20th Aug 2003 09:26 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:24 PM.