Today I Learned #2

Well… Admit I didn’t get much done in my free time today, played Civ V instead.

Also started playing Bravely Default, just got to the second boss.  The system is nice but this boss is really annoying.  Status effects everywhere, and the fact that the boss can store and release multiple heavy AoE attacks in a row was not a fun realization.  It’s mildly interesting so far, I’ll see where it goes.

Learned about C# Reflection, man that was nice.  Weird I didn’t feel the need to use it until now, used it with an ASP.Net web forms project.  So you have a form, it’s got a bunch of controls, and you’ve got to save/update a database row with a large number of columns.  Each form submission updates one of these rows.  It gets really tedious binding each data column to each control manually.

C# reflection comes in where you dynamically get a list of properties (and as I learned soon after, fields), give your controls IDs that can be matched up to the DB column names, and then loop through and populate the form / gather fields from the form.  It sure makes things a lot neater than having line upon line of individual form/data binding.

3 Comments on “Today I Learned #2”

  1. hey your work is amazing

  2. Hyun Lee says:

    Waiting for TIL #3.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s