Skip to content

Instantly share code, notes, and snippets.

@NamekMaster
Created June 21, 2022 05:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NamekMaster/da7537ca74e149d139d063a12c2779ff to your computer and use it in GitHub Desktop.
Save NamekMaster/da7537ca74e149d139d063a12c2779ff to your computer and use it in GitHub Desktop.
CSharp source template example
using System.Collections.Generic;
using System.Globalization;
using JetBrains.Annotations;
using UnityEngine;
public static class Foo
{
[SourceTemplate]
public static void @for<T>(this int x, string i)
{
//$ for (int $i$ = 0; $i$ < x; $i$++)
{
//$ $END$
}
}
[SourceTemplate]
public static void forEach<T>(this IEnumerable<T> x, string i)
{
//$ foreach (var $i$ in x)
// {
//$ $END$
// }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment