forked from dotnet/templating
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added conditional processing for C# language features based on langua…
…geVersion / framework
- Loading branch information
1 parent
6875aa5
commit 80c10e6
Showing
7 changed files
with
367 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
...e_feed/Microsoft.DotNet.Common.ProjectTemplates.6.0/content/ClassLibrary-CSharp/Class1.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
namespace Company.ClassLibrary1 | ||
#if (!csharpFeature_ImplicitUsings) | ||
using System; | ||
|
||
#endif | ||
namespace Company.ClassLibrary1 | ||
{ | ||
public class Class1 | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 20 additions & 1 deletion
21
...Microsoft.DotNet.Common.ProjectTemplates.6.0/content/ConsoleApplication-CSharp/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,21 @@ | ||
Console.WriteLine("Hello, World!"); | ||
#if (csharpFeature_TopLevelProgram) | ||
// See https://aka.ms/new-console-template for more information | ||
#endif | ||
#if (!csharpFeature_ImplicitUsings) | ||
using System; | ||
|
||
#endif | ||
#if (csharpFeature_TopLevelProgram) | ||
Console.WriteLine("Hello, World!"); | ||
#else | ||
namespace Company.ConsoleApplication1 | ||
{ | ||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
Console.WriteLine("Hello, World!"); | ||
} | ||
} | ||
} | ||
#endif |
Oops, something went wrong.