Gino Abraham's Blog

General Dotnet Tips

SharpDevelop - Open Source IDE for C#/VB.Net Projects

#develop (short for SharpDevelop) is a free IDE for C#, VB.NET and Boo projects on Microsoft's .NET platform. I found this usefull.

It is open-source, and you can download both sourcecode and executables from http://www.icsharpcode.net/OpenSource/SD/Download/

Accessing Interop dlls makes winforms exes non responsive

In one of my windows application, I was making use of Domino inerop for accessing document data from lotus notes. Whenever the interop was probed for some bigger response, my application use to be non responsive or hang.Once the call to inerop is done the application was accessible. Users will not know the progress in such scenarios. You can avoid this by introducing a Background thead. Move all the inerop method calls to a seperate function. On you event handler add a background thread and call ......

Enums in C# - To get text value from corresponding number

Enums are always a favourite when we want to restrict users while sending some string to a generic methods. Was exploring how to get the text of the enum from the correspoing number. .Typecasting the number to the enum type would get the text from enum. Have shared a sample on this Using System; namespace ConsoleApplication1 { class Program{ enum WeekDays { Sun = 1, Mon = 2, Tue, Wed, Thu, Fri, Sat } staticvoid Main(string[] args) { Console.WriteLine(((int)Wee... Console.WriteLine(((WeekDay... ......

Lotus Notes Interop to connect from dotnet application to Lotus Notes Database

While connecting to Lotus notes database from dotnet application using Interop.Domino dll, I was getting the following error. (“Retrieving the COM class factory for component with CLSID {29131539-2EED-1069-BF5D-00... failed due to the following error: 80040154”) When i installed Domino Server setup we the issue was solved. But unforunately this will not roll out as we might have to run the migration application in different machines. After searching a lot i net i found an article in IBM site ......

DataTable manipulation in C#

Often we would have came across a requirement where we have to filter a data table rows and copy the filtered data into a different datatable and bind the same to grid or some other data bound control. This can be achieved in several ways. One such way is given below. The initial section in the code is to create a sample data table with some sample records. Then the data table is queried with a filter condition to get collection of rows. (dtTaskList.Select("TaskEff... Once done with ......

Parsing Complex Expressions in CSharp (Round about for Expression Evaluators)

Expression Parser,Parse, Parsing Expression, Expression Evaluator, Eval,formula

Getting Distinct Column Values from a (C#)Datatable

The following code snippet shows you a way to extract distinct values in a specific column from a datatable. // Datatable Creation DataTable dt = new DataTable(); DataColumn dc = new DataColumn("Col1"); dt.Columns.Add(dc); dc = new DataColumn("Col2"); dt.Columns.Add(dc); DataRow dr = dt.NewRow(); dr[0] = "A1"; dr[1] = "B1"; dt.Rows.Add(dr); dr = dt.NewRow(); dr[0] = "A1"; dr[1] = "B2"; dt.Rows.Add(dr); dr = dt.NewRow(); dr[0] = "A1"; dr[1] = "B3"; dt.Rows.Add(dr); // To Copy distinct values from ......

Crack Protected Excel Sheet

The following snippet will allow you to unprotect an excel sheet which is protected using a password.Note that this code won’t help if a password prompt appears immediately after you try to open the Excel file -- it means the whole spreadsheet is encrypted and you need a commercial solution to unlock it. In my experience, online services like www.Password-Find.com handle this job best of all, plus they can unlock VBA projects, too. press Alt + F11 when the excel is open, it will open up VB macro ......

Connection Pooling issue in ODP.Net

Well this post addresses the connection pooling reference issue that is not handled in ODP.Net. TO give an intro, ODP.Net is one among the data provider when you use oracle as a back end to connect from your .Net applications. I worked for a project where we used ODP.Net to connect to ORacle from Asp.net. It went well for few months till we got a critical bug saying the application is showing some yellow screen when user logs in the morning. No exceptions were logged to DB as well. We were clue less ......

Adding Intelligence to your Search Engines.

Conventinal Way of Searching : When there is a requirement to add a Search feature inside a website to search through knowledge base the first thing that will crack our mind is to add a Free Text Search with some Keywords. If it is a SQL server we will hit a free text query over a specific keyword index else we might lookout for some third party indexing utility like lucene.net to to fetch best matching result for the end user. This is called Keyword Searching. The search key words will be like "CEO ......

Full General Dotnet Tips Archive