'How to create a Code Template in Rider on array type specifically (for postfix character)?

I want to have an ability to write someArray.rnd and I want it to generate the below code:

UnityEngine.Random.Range(0, someArray.length)

I found these Postfix Templates, but I see no option to define our own for C#, only for Javascript/Typescript. Is this possible to have code generation like this in Rider for Unity?



Solution 1:[1]

No, afaik you cannot create Postfix Templates from a handy tool, e. g. like the Template Explorer in Visual Studio.

You either develop a custom plugin (which is not very difficult by the way) or you create a Live Template (see File | Settings | Editor | Live Templates | C# in Rider).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mu88