Difference between revisions of "Csharp warning CS0168: The variable 'NeverUsed' is declared but never used"
esse quam videri
m (Text replacement - "<csharp>" to "<syntaxhighlight lang="csharp" line="1" >") |
|||
Line 1: | Line 1: | ||
[[Category:Object Oriented Programming]] | [[Category:Object Oriented Programming]] | ||
− | <csharp>using System; | + | <syntaxhighlight lang="csharp" line="1" >using System; |
namespace HelloClass | namespace HelloClass | ||
{ | { |
Revision as of 18:28, 25 January 2016
<syntaxhighlight lang="csharp" line="1" >using System; namespace HelloClass {
class HelloWorld { public static void Main() { int NeverUsed; Console.WriteLine("Hello World!"); } }
}</csharp> Produces
Microsoft (R) Visual C# .NET Compiler version 7.10.6001.4 for Microsoft (R) .NET Framework version 1.1.4322 Copyright (C) Microsoft Corporation 2001-2002. All rights reserved. helloError3.cs(9,17): warning CS0168: The variable 'NeverUsed' is declared but never used
This is only a warning the csc compiler will still compile the program.