Monday, November 3, 2014

#31 : Loading file content into Array of Hash Table

While programming, sometimes we need to read some configuration entries from a flat file. There are several approaches to do it, I have followed the below approach to read file-entries into a hash table which is also an array.
I have assumed that there is a flat file which contains multiple lines of information about employee. This can be configuration settings or it can be anything. I have used this simple example for simplicity -







There might be many other approach to do it, I do not advocate it as a best approach, but if you want to have full control and understandability of the code, you may use the above approach.

2 comments:

  1. Life is full of many challenges. Challenges that will make you or break you depending on how you handle it. Visit my site for more updates. God Bless to your site.

    n8fan.net

    www.n8fan.net

    ReplyDelete
  2. The subsequent time I learn a blog, I hope that it doesnt disappoint me as a lot as this one. I mean, I know it was my option to learn, but I really thought youd have something attention-grabbing to say. All I hear is a bunch of whining about one thing that you could repair if you werent too busy on the lookout for attention. gsn casino slots

    ReplyDelete

#112: How to handle xml document in Powershell?

 In PowerShell, you can handle XML data using various cmdlets and methods provided by the .NET Framework. Here's a basic guide on how to...