Various ways to execute shellcode.
C: Written/Tested using an empty project in VS 2022.
C#: Tested with VS 2022 and csc.
The usage can be found commented at the top of each file. Additionally, there's a basic check to ensure that enough arguments have been passed when executed.
A good resource for other shellcode execution methods is vx underground's "Evasion - Process Creation and Shellcode Execution" section here.