diff --git a/packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs b/packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs index 96ceb12b48435..6aadf6a3a0e05 100644 --- a/packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs +++ b/packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs @@ -4,7 +4,7 @@ namespace %name.PascalCased% { public class %name.PascalCased%Stack : Stack { - public %name.PascalCased%Stack(Construct scope, string id, IStackProps props = null) : base(scope, id, props) + internal %name.PascalCased%Stack(Construct scope, string id, IStackProps props = null) : base(scope, id, props) { // The code that defines your stack goes here } diff --git a/packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/Program.template.cs b/packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/Program.template.cs index 87a103bcb8816..a2ce1b67fdd53 100644 --- a/packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/Program.template.cs +++ b/packages/aws-cdk/lib/init-templates/app/csharp/src/%name.PascalCased%/Program.template.cs @@ -5,9 +5,9 @@ namespace %name.PascalCased% { - class Program + sealed class Program { - static void Main(string[] args) + public static void Main(string[] args) { var app = new App(); new %name.PascalCased%Stack(app, "%name.PascalCased%Stack"); diff --git a/packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs b/packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs index 61091faca37b9..365330ed65925 100644 --- a/packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs +++ b/packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs @@ -7,7 +7,7 @@ namespace %name.PascalCased% { public class %name.PascalCased%Stack : Stack { - public %name.PascalCased%Stack(Construct parent, string id, IStackProps props = null) : base(parent, id, props) + internal %name.PascalCased%Stack(Construct scope, string id, IStackProps props = null) : base(scope, id, props) { // The CDK includes built-in constructs for most resource types, such as Queues and Topics. var queue = new Queue(this, "%name.PascalCased%Queue", new QueueProps diff --git a/packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/Program.template.cs b/packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/Program.template.cs index 0ef3d334917d4..20d5337f09888 100644 --- a/packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/Program.template.cs +++ b/packages/aws-cdk/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/Program.template.cs @@ -2,9 +2,9 @@ namespace %name.PascalCased% { - class Program + sealed class Program { - static void Main(string[] args) + public static void Main(string[] args) { var app = new App(); new %name.PascalCased%Stack(app, "%name.PascalCased%Stack");