2009-03-18
| Table of Contents: |
| Rate This Article: | Add This Article To: |
( Page 1 of 4 )
Dynamic code creation techniques can make certain classes of application development easier.
Normally, a developer creates a static design and that design provides everything needed for the application to work as anticipated. However, there are situations where a developer might not be able to anticipate every need at the outset.
This article looks at two such situations. The first is when a developer needs to create a control dynamically and then attach code to that control. For example, you might want to create a list of links, but not know how many links to create or the data that will appear in those links until runtime. The second is when you need to define code on the fly to reflect a particular need. For example, you may have to execute code that reflects the user’s system configuration.
Situations such as these don’t occur every day. In fact, they’re extraordinary conditions that you may not encounter more than a few times as a developer. However, it’s important to realize that .NET provides methods for dealing with dynamic situations. Given the right technique, you can write applications that are flexible enough to deal with any dynamic situation.
![]() |
|


