Click here to Skip to main content
15,891,248 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi I want to write binary code in my program for example for "if" i don't want to write "if" and i want to write it binary code what should i do to it change?
i know how to change to binary but in C# it doesn't work
does it have any way to write code like this?
Posted
Comments
Maciej Los 27-Oct-14 10:52am    
What?
Avenger1 27-Oct-14 11:01am    
for example this code
if(a>2)
{
}
else
{
}
and now i don't want to write it like this and i want to write it in binary code i mean this one
11010011100110(1100001>110010)
{
}
1100101110110011100111100101
{
}
is it possible to do it in c#?
CPallini 27-Oct-14 12:31pm    
No, it is not possible.
CPallini 27-Oct-14 12:31pm    
No, it is not possible.

1 solution

You don't write binary code in C# - you can write IL code and embed that in you C#: https://visualstudiogallery.msdn.microsoft.com/44034a7b-143d-4b51-b7bc-99aa656ba137[^], but that's about as far as you can go, as the final "binary" version isn't produced until the code is run and the JIT compiler gets it's hands on it.

And why, oh why would you want to "write in binary" anyway? I've been there, don't that, got the T shirt. And one of the major advantages of modern languages is that you don't have to do it again! It's slow, difficult and a maintenance headache.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900