Please see this link.

https://www.upwork.com/resources/c-sharp-vs-c-plus-plus#:~:text=Performance%3A%20C%2B%2B%20is%20widely,applications%20where%20performance%20is%20important.

Here, is the some differences-

  • Runtime: C# uses the common language runtime (CLR) provided by the .NET framework to convert C# into native code. C++ compiles directly into native code and does not require a universal runtime system. C++ libraries make direct system calls to the OS.
  • Size of binaries: We mentioned that the two languages are compiled languages that turn your code into binary files. C# has a lot of overhead and libraries included before it will compile. C++ is much more lightweight. Therefore, C# binaries are much larger after it compiles compared to C++.
  • Performance: C++ is widely used when higher level languages are not efficient. C++ code is much faster than C# code, which makes it a better solution for applications where performance is important. For instance, your network analysis software might need some C++ code, but performance is probably not a huge issue for a standard word processing application coded in C#.
  • Garbage collection: With C#, you don’t have to worry much about garbage collection. With C++, you have no automatic garbage collection and must manually allocate and deallocate memory for your objects.
  • Platform target: C# programs are usually targeted towards the Windows operating system, although Microsoft is working towards cross-platform support for C# programs. With C++, you can code for any platform including Mac, Windows and Linux.
  • Types of projects: C++ programmers generally focus on applications that work directly with hardware or that need better performance than other languages can offer. C++ programs include server-side applications, networking, gaming, and even device drivers for your PC. C# is generally used for web, mobile and desktop applications.
  • Compiler warnings: C++ will let you do almost anything provided the syntax is right. It’s a flexible language, but you can cause some real damage to the operating system. C# is much more protected and gives you compiler errors and warnings without allowing you to make some serious errors that C++ will allow.