Hi and welcome to UE4!
UE4 has two choices, C++ and Blueprints. While C++ and C# are close, there are differences that would make running the script from working. Plus, UE4 has all these neat C++ macros that will make your life easier.
Check this out: Programming with C++ | Unreal Engine Documentation
Great resource to get started…
teak