0

Is it possible to compile C sharp directly to bare metal?

So I have a library called zero Sharp that compiles C sharp programs to bare metal, but it won't allow me to use the console.readline command. Is there any way I can read a user input without the console.readline demand?

14th Mar 2024, 8:43 PM
Liam Greenway
Liam Greenway - avatar
5 odpowiedzi
+ 3
Windows Forms includes a user input model based on events that are raised while processing related Windows messages.
15th Mar 2024, 1:10 AM
JaScript
JaScript - avatar
0
Have you considered command line arguments?
15th Mar 2024, 4:11 AM
Tibor Santa
Tibor Santa - avatar
0
I would use command line arguments, but that would mean your entire input path would be predetermined. Not much of an os if you ask me
15th Mar 2024, 9:30 AM
Liam Greenway
Liam Greenway - avatar
0
Compiling C# directly to bare metal, while theoretically possible, is not a common practice. C# is typically compiled to intermediate language (IL) bytecode, which is then executed by the Common Language Runtime (CLR) in a managed environment. To interact directly with hardware or access low-level functionality without relying on libraries like `Console.ReadLine`, you would need to use platform-specific libraries or APIs. However, without an underlying operating system, standard input/output operations like `Console.ReadLine` may not be available. Instead of relying on console input/output, you might need to implement your own methods for user input. This could involve reading from hardware registers or using other input mechanisms available at the bare metal level. It's worth noting that working at the bare metal level requires a deep understanding of hardware architecture and may involve writing code specific to the target hardware platform. Additionally, using specialized tools or frameworks tailored fo
16th Mar 2024, 11:59 AM
Rohit Krishna
Rohit Krishna - avatar
0
Im just switching to C
16th Mar 2024, 1:47 PM
Liam Greenway
Liam Greenway - avatar