Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code within code
#1
Here is just a little tip for you guys, if you ever want to store a snippet of code within a variable, you can use the following syntax.
Code:
<code>
</code>

So for example,
Code:
Dim c = <code>
Messagebox.Show("Hello!")
</code>

This will actually store the code to display a messagebox with the text of 'Hello' within the c variable. This is very useful if you would like to develop some sort of plugin system for your application.

I am not too familiar on how executing that variable actually works, but here is a code snippet that shows the execution of code stored within a variable.
<!-- m --><a class="postlink" href="http://pastebin.com/CKfD7nRz">http://pastebin.com/CKfD7nRz</a><!-- m -->
My Blog | My Setup | My Videos | Have a wonderful day.


Messages In This Thread
Code within code - by brandonio21_phpbb3_import2 - 01-07-2012, 12:31 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)