Loading...

C# 14 New Feature: Script Directives

C# 14 New Feature: Script Directives

C# 14 introduces new directives that transform C# into a true scripting language. In this video, Ian Griffiths explains how the .NET 10 SDK now lets you run a single C# source file directly—no project file required.

What you'll learn:

  • How to run C# files directly with dotnet run
  • The shebang (#!) directive for Unix/Linux script execution
  • The new #: directive for adding NuGet packages and build properties
  • How these features build on the low-ceremony entry points introduced in C# 9

Contents:

  • 00:00 Introduction to C# 14 Scripting Capabilities
  • 00:10 Running C# Source Files with .NET 10 SDK
  • 00:32 Simplifying C# Program Structure
  • 01:47 Shebang Syntax for Unix Systems
  • 04:05 Ignored Directives in C# 14
  • 04:44 Using External Libraries in C# Scripts
  • 07:38 Conclusion

Published on:

Learn more
endjin.com
endjin.com

We help small teams achieve big things.

Share post:

Related posts

Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy