C
C#2mo ago
s9_ao

Converting a code from C to C#

So I got a game called Velocity Vortex that I coded in C, now I wanna do the same in C# but it’s about 6437 lines of code, how do I do that? There is not a single Ai that I know that can do it
4 Replies
Somgör from Human Resources
A good first step would be learning C# :pwetty:
Pobiega
Pobiega2mo ago
you won't be able to just run it through a readymade tool and have it work. Your best bet will be to manually re-implement it in C#.
Joschi
Joschi2mo ago
Even if you find some tool that does some translation, it will most likely require a lot of work to get that "translated" code working. And then you are most likely stuck with a suboptimal hard to read code base. You are probably not only better off, but also faster, if you re-implement your code in C#.
olsu
olsu5w ago
it depends why you want it in c#. if it's applicable, you could refactor your code (if needed) to export all the necessary functions to a dll, then import the dll in c#. FNA (C#) does this with FNA3D (c) if you want to see an example
Want results from more Discord servers?
Add your server
More Posts
✅ Blazor / ASP.NET - @inject keyed serviceIs there a way in .NET 8 to *inject* a keyed service like a normal service with the `@inject` keyworIm coding my 3D engine called STRATIS and there are two errors.Im coding my 3D engine called STRATIS and there are two errors. foreach (var tri in meshCube.tris) What's the difference between webhook and sending an HTTP request to an endpoint exposed by clientHi I'm learning about building web api at the moment. Came across this concept called webhook and isIdentifying the Framework in a .csproj fileWhen you are trying to identify the framework from a csproj file, sometimes there are multiple versiMSBuild For c# project with c++ dllsSo i have a c# project and a c++ cmake project , the c# project is referenced by the actual program ✅ Typically how is an image stored?Im trying to set up an ASP.NET Project where i have a profile section. Users can then choose to uplMarshalDirectiveException: Cannot marshal 'return value': Invalid managed/unmanaged type combinationBasically trying to wrap a dll (wiiuse library) into my godot game with c# and whenever i call my wrNeed help to get data from MongoDBi have my mongodb data that like this ``` bson [ { "_id": {"$oid": "665b193178262482ba1f5bcaTrying to create objects using a loop, but don't know what i'm doing wrong?so i'm trying to update my turtle race simulator using tasks, one of the changes is to be able to chCan't get Data in Controller by Ajax from View in dotnet MVC CoreI am trying to pass data from a view to my controller. I am getting the values in Ajax correctly, bu