Click here to Skip to main content
15,894,646 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to convert #code To String Using C# Programing?
Posted
Comments
Sergey Alexandrovich Kryukov 1-Feb-12 2:04am    
Which code?! What's on input? What should be on output? (Code is already a string, or do you mean executable code?) Reverse engineering or what?
--SA
Kim Togo 1-Feb-12 2:13am    
Unclear...?
Pete O'Hanlon 1-Feb-12 14:02pm    
What exactly do you mean by this? Are you talking about a Twitter hash tag?
BillWoodruff 1-Feb-12 18:59pm    
< reposted as comment because I felt it did not merit being posted as a 'solution >

Just in case you are looking for a "dirty, sneaky" way to do this at run-time, you could actually open and read a file containing code (not sure if you'd have to deal with issues of files-in-use being "locked," or not): but I find it hard to imagine why you would want to do that.

Please give us a clear practical example of exactly what you want to do: I assume you want to "read the code" at run-time, right ?

And, then, what are you going to with the code you've "read" ?

1 solution

// Vague questions result in useless answers
String code = "#code";
 
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