question

JonKane-6190 avatar image
0 Votes"
JonKane-6190 asked PengGe-MSFT commented

Every new file with the same start code

Is it possible for me to setup a way so that every new c file I create already has some starting code? Because every single file I create I have to retype the same thing, and it'd be much nicer if it were already written when I open the file.

vs-general
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I'd second @RLWA32-6355 recommendation, this is the best method to obtain what you are looking for. With that known, for completeness there is File Templates in Resharper that take templating to the next level e.g. macros to write code based on specific logic, create partial classes in different folders and have these templates available at the top of the Add new context menu.


0 Votes 0 ·

Do you still meet this issue? If so, could you please share more detailed information, I am looking forward to seeing your message.

0 Votes 0 ·

1 Answer

RLWA32-6355 avatar image
0 Votes"
RLWA32-6355 answered

You can create your own item template to add a C file that contains your preferred skeleton code to a project. Refer to how-to-create-item-templates


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.