Predefined File Templates for C#
This topic lists all predefined file templates for C# in JetBrains Rider 2021.1. For more information about file templates, see Create Files from Templates
Template | Details |
---|---|
Class | Create a new file containing an empty C# Class in the current project. Scope C# projects Body $HEADER$namespace $NAMESPACE$
{
public class $CLASS$ {$END$}
} Parameters
|
Interface | Create a new file containing an empty C# Interface in the current project. Scope C# projects Body $HEADER$namespace $NAMESPACE$
{
public interface $INTERFACE$ {$END$}
} Parameters
|
Struct | Create a new file containing an empty C# Struct in the current project. Scope C# projects Body $HEADER$namespace $NAMESPACE$
{
public struct $STRUCT$ {$END$}
} Parameters
|
Enum | Create a new file in the current project containing an empty C# Enum. Scope C# projects Body $HEADER$namespace $NAMESPACE$
{
public enum $ENUM$ {$END$}
} Parameters
|
Test Fixture | Test Fixture Scope C# projects, references nunit.framework Body $HEADER$using NUnit.Framework;
namespace $NAMESPACE$
{
[TestFixture]
public class $CLASS$ {$END$}
} Parameters
|
Razor MVC Partial View | Razor MVC Partial View Scope Razor (C#) projects, Razor (C#) Views folder Body @model $model$
$END$ Parameters
|
Razor MVC View | Razor MVC View Scope Razor (C#) projects, Razor (C#) Views folder Body @model $model$
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<title>$title$</title>
</head>
<body>
<div>
$END$
</div>
</body>
</html> Parameters
|
Razor MVC View with Layout | Razor MVC View with Layout Scope Razor (C#) projects, Razor (C#) Views folder Body @model $model$
@{
ViewBag.Title = "$title$";
Layout = "$_Layout$";
}
<h2>$title$</h2>
$END$ Parameters
|