Author: Benjamin Perkins

Simplified Deployment

Benjamin Perkins C#

DLL Hell. Enough said, well maybe not. Before .NET every installation of a new version of a program or the installation of any program was a gamble. There was always a risk that a necessary component required to run the new version would overwrite a component which is used by another causing the old program […]

Read More →

Using Generics with Interfaces in C#

Benjamin Perkins C#

I wanted to create an interface; however one of the methods I wanted to implement in it had a class as a parameter. I thought about it and realized that be doing so I would be tightly binding my interface to a specific class. I didn’t think that was good practice because interfaces need to […]

Read More →

How to search a Lucene.Net index in C#

Benjamin Perkins Lucene.NET

I used this code to perform a search of a Lucene.Net index. Lucene.Net.Store..Directory directory =      Lucene.Net.Store.FSDirectory                .Open(new DirectoryInfo(textBoxSearchIndex.Text)); Lucene.Net.Analysis.Analyzer analyzer =      new Lucene.Net.Analysis.Standard                    .StandardAnalyzer(LuceneUtil.Version.LUCENE_29); Lucene.Net.Search.Searcher searcher =      new Lucene.Net.Search                .IndexSearcher(LuceneIndex.IndexReader                                          .Open(directory, true)); Lucene.Net.Search.Query query =      new Lucene.Net.QueryParsers                .QueryParser(LuceneUtil.Version.LUCENE_29,                             “contents”, analyzer)                             .Parse(textBoxSearch.Text); Lucene.Net.Search.Hits hits = […]

Read More →

Treeview with checkbox in WPF

Benjamin Perkins C#

On one of my projects I had to provide treeview selection functionality. I searched the internet and pulled everything I could into a this single resource. I wasn’t able to find 1 post that provided all the details and source code to do what I needed. Now there is one and if you find it, […]

Read More →

Strings in C#

Benjamin Perkins C#

The String class in .Net has many capabilities. Below is a list of some string methods I use frequently in my development projects. Even when I have completed this list, I am sure it will over cover 5% of the capabilities within the String class. After reading this, I suggest you look over the MSDN […]

Read More →