Skip to content

Instantly share code, notes, and snippets.

View Odepax's full-sized avatar
:shipit:
Edit this user's status

Odepax

:shipit:
Edit this user's status
View GitHub Profile
@Odepax
Odepax / CallerMemberName-works-on-fields.cs
Created September 21, 2021 20:10
CallerMemberName works on fields!
using System.Runtime.CompilerServices;
static class Program {
class Symbol {
public readonly string DebugName;
public Symbol([CallerMemberName] string? debugName = null) => DebugName = debugName ?? string.Empty;
}
static readonly Symbol TheSymbol = new(); // TheSymbol.DebugName is "TheSymbol"!
}
@Odepax
Odepax / Remove-Git-Tag.txt
Created November 22, 2021 19:13
Remove Remote Git Tag
git tag -d "tag_name"
git push --delete origin "tag_name"