Click here to Skip to main content

Articles by Mohammad A Rahman (Articles: 7, Tip/Tricks: 23)

Articles: 7, Tip/Tricks: 23

RSS Feed

Average article rating: 4.80

Trace and Logs

AnLogger - ASP.NET Logger
Posted: 9 Oct 2011   Updated: 13 Nov 2011   Views: 17,081   Rating: 4.63/5    Votes: 9   Popularity: 4.06
Licence: The Code Project Open License (CPOL)      Bookmarked: 39   Downloaded: 912
Easy and Fast ASP.NET Logging via Email and Storing Exception into File System as Files

C#

How does it work in Mono's C# compiler?
Posted: 14 Feb 2012   Updated: 30 Apr 2012   Views: 42,496   Rating: 4.98/5    Votes: 44   Popularity: 8.19
Licence: The Code Project Open License (CPOL)      Bookmarked: 58   Downloaded: 509
The Mono is an Open Source free programming language project. It has the implementation of Microsoft’s .NET Framework based on the ECMA standards for C# language and Common Language Runtime (CLR). In this article, I will explore how the Mono C# compiler works.
How does it work in C#? - Part 1
Posted: 10 Oct 2011   Updated: 20 Nov 2012   Views: 84,714   Rating: 4.77/5    Votes: 73   Popularity: 8.89
Licence: The Code Project Open License (CPOL)      Bookmarked: 222   Downloaded: 2,060
How does var, auto implemented properties and += or -= of events work in C# programming language.
How does it work in C#? - Part 3 (C# LINQ in detail)
Posted: 13 May 2012   Updated: 25 Dec 2012   Views: 148,533   Rating: 4.94/5    Votes: 143   Popularity: 10.64
Licence: The Code Project Open License (CPOL)      Bookmarked: 363   Downloaded: 771
Language Integrated Query (LINQ) is a Microsoft .NET Framework component that works as a communicator between the objects and the data. This article partially taken from the "Expert C# 5.0" - book and it will explore the different extension methods used in the LINQ using C# and IL code to discuss..
How does it work in C#? - Part 2
Posted: 12 Oct 2011   Updated: 4 Feb 2013   Views: 46,305   Rating: 4.75/5    Votes: 37   Popularity: 7.47
Licence: The Code Project Open License (CPOL)      Bookmarked: 133   Downloaded: 1,452
How does throw, rethrow and where, select clause of Enumerable class work in C# programming language.

Algorithms & Recipes

ID3 Decision Tree Algorithm - Part 1
Posted: 27 Sep 2011   Updated: 1 Feb 2012   Views: 16,557   Rating: 4.71/5    Votes: 7   Popularity: 4.08
Licence: The Code Project Open License (CPOL)      Bookmarked: 20   Downloaded: 0
ID3 Decision Tree Algorithm - Part 1 (Attribute Selection Basic Information)

Third Party Products and Tools

Exception logging using Elmah - Error Logging Modules and Handlers for ASP.NET
Posted: 29 Apr 2011   Updated: 29 Apr 2011   Views: 11,547   Rating: 0.0 / 5    Votes: 0   Popularity: 0.0
Licence: The Code Project Open License (CPOL)      Bookmarked: 12   Downloaded: 507
Exception logging using Elmah - Error Logging Modules and Handlers for ASP.NET
No blogs have been submitted.

Average tips rating: 4.36

Edit Controls

How to clear a Multiple TextBox values in a single click in C# .NET [Tip/Trick]
Posted: 22 Sep 2011   Updated: 22 Sep 2011   Views: 1,981   Rating: 4.43/5    Votes: 7   Popularity: 3.66
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
A generic text clear method for those ASP.NET controls which implement the ITextControl interface:private void Clear(ControlCollection controlCollection) where T : ITextControl{ if (controlCollection == null) return; ...

ASP.NET

Invoke a ASP.NET page method from a User Control [Tip/Trick]
Posted: 13 May 2011   Updated: 14 Jun 2011   Views: 13,378   Rating: 3.83/5    Votes: 6   Popularity: 3.42
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 0
How to execute ASP.NET method from control's event handler of a web user control.
Send ASP.NET formatted exception details via email [Tip/Trick]
Posted: 23 Sep 2011   Updated: 9 Oct 2011   Views: 20,316   Rating: 4.95/5    Votes: 12   Popularity: 5.34
Licence: The Code Project Open License (CPOL)      Bookmarked: 18   Downloaded: 0
How to send ASP.NET formatted exception details via email

C#

Caching uses with Proxy pattern in C# [Tip/Trick]
Posted: 12 Jun 2011   Updated: 12 Jun 2011   Views: 9,430   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 0
Caching uses with Proxy pattern in C#
Template method pattern and Action in C# [Tip/Trick]
Posted: 20 Jun 2011   Updated: 21 Jun 2011   Views: 10,899   Rating: 4.75/5    Votes: 4   Popularity: 2.81
Licence: The Code Project Open License (CPOL)      Bookmarked: 9   Downloaded: 0
An abstract base class with abstract methods and a common method with implementation which will be used by the implementer classes of the abstract class.
Logical and arithmetic operations in C# [Tip/Trick]
Posted: 26 Jun 2011   Updated: 26 Jun 2011   Views: 20,950   Rating: 4.71/5    Votes: 4   Popularity: 2.81
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 0
Some logical and arithmetic operations in C#
Logical and arithmetic operations in C# [Tip/Trick]
Posted: 28 Jun 2011   Updated: 29 Jun 2011   Views: 1,129   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
The code has been updated to improve the performance:public static bool DoSequenceOfOr(params Func[] sequenceOfBooleanValue){ foreach (Func item in sequenceOfBooleanValue) if (item()) return true; return false;}public static bool...
Parse Key/Value of a Generic Dictionary in C# [Tip/Trick]
Posted: 10 Jul 2011   Updated: 10 Jul 2011   Views: 5,762   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
Parse key/value of a Generic dictionary in C#.
Convert DataTable to String by Extension Method [Tip/Trick]
Posted: 29 Sep 2011   Updated: 30 Sep 2011   Views: 3,773   Rating: 0.0 / 5    Votes: 0   Popularity: 0.0
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
Following might be another way to do the job:public static string ConvertDataTableToString(this DataTable dt){ StringBuilder stringBuilder = new StringBuilder(); dt.Rows.Cast().ToList().ForEach(dataRow => { ...

Collections

ForEach extension on IList [Tip/Trick]
Posted: 22 Sep 2011   Updated: 2 Oct 2011   Views: 1,793   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
The List class already has a method doing the same job as:public static void ForEach(this IList list, Action function)More about the ForEach method is available here. Here is the reflected ForEach method:public void ForEach(Action action){ if (action == null) { ...

Programming Tips

A Generic enum Parser in C# [Tip/Trick]
Posted: 18 May 2011   Updated: 22 May 2011   Views: 23,158   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 9   Downloaded: 0
A Generic enum Parser in C# [Tip/Trick]
Posted: 30 May 2011   Updated: 7 Jun 2011   Views: 1,387   Rating: 3.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
The ParseEnum method will not work where we use a version below .NET Framework 4.0 because of the TryParse method. So those who need to use it in below .NET Framework 4.0 or in .NET Framework 4.0, the following extension methods will be helpful:public static TEnum ParseEnum(this...
Strategy method or Switch statement in C# [Tip/Trick]
Posted: 8 Jun 2011   Updated: 8 Jun 2011   Views: 14,257   Rating: 5.00/5    Votes: 5   Popularity: 3.49
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 0
Few extension methods of String concatenation in C# [Tip/Trick]
Posted: 22 May 2011   Updated: 19 Jun 2011   Views: 12,739   Rating: 4.67/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 0
Few extension methods of String concatenation in C#
A Generic Ternary Operator for value types and parameterless method [Tip/Trick]
Posted: 24 May 2011   Updated: 25 Jun 2011   Views: 9,343   Rating: 3.50/5    Votes: 2   Popularity: 0.90
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 0
A Generic Ternary Operator for value types and parameterless method
Strategy of type selection in C# [Tip/Trick]
Posted: 4 Jul 2011   Updated: 4 Jul 2011   Views: 3,847   Rating: 4.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
Strategy of type selection in C#
Few extension methods of IEnumerable in C# [Tip/Trick]
Posted: 4 Jul 2011   Updated: 5 Jul 2011   Views: 12,596   Rating: 1.00/5    Votes: 2   Popularity: 0.30
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 0
Few extension methods of IEnumerable in C#
Reverse of a string without using the Reverse function in C# and VB [Tip/Trick]
Posted: 25 Jul 2011   Updated: 25 Jul 2011   Views: 1,031   Rating: 0.0 / 5    Votes: 0   Popularity: 0.0
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
Another way,public static class ReverseStringExtension{ public static string Reverse(this string dataToRevese) { Func reverseFunc = (dataToFunc) => { StringBuilder reverseBuilder = new StringBuilder(); for (int index =...
Whats My IP Address ? [Tip/Trick]
Posted: 14 Sep 2011   Updated: 14 Sep 2011   Views: 1,610   Rating: 4.75/5    Votes: 5   Popularity: 3.30
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
namespace IpAddresses{ using System; using System.Collections.Generic; using System.Linq; using System.Net; class Program { static void Main(string[] args) { GetIPAddresses().ForEach(ip => Console.WriteLine(ip)); } ...
Rename files recursively with formatted name in C# [Tip/Trick]
Posted: 1 Oct 2011   Updated: 2 Oct 2011   Views: 3,993   Rating: 0.0 / 5    Votes: 0   Popularity: 0.0
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
Rename all the files from the given folder using C#. The code will go through all the files and rename with the same name but with formatted name for example by removing "-" or "_" etc with given characters..
Run only one instance from you program [Tip/Trick]
Posted: 23 Sep 2011   Updated: 2 Oct 2011   Views: 1,338   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
In addition, there are many articles posts that have been discussed about this, for example,Single Instance Application in C#[^]Single-Instance C# Application - for .NET 2.0[^]Stream Decorator, Single-Instance Apps[^]
Calculate the Factorial of an Integer in C# [Tip/Trick]
Posted: 4 Oct 2011   Updated: 4 Oct 2011   Views: 3,350   Rating: 4.20/5    Votes: 5   Popularity: 2.80
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
It could be done using Recursive Lambda Expression, for example,class Program{ static Func Factorial = x => x < 0 ? -1 : x == 1 || x == 0 ? 1 : x * Factorial(x - 1); static void Main(string[] args) { Console.WriteLine(Factorial(5)); }}(The code...

String handling

String concatenation using LINQ to create a CSV/PSV string [Tip/Trick]
Posted: 28 Jun 2011   Updated: 29 Jun 2011   Views: 1,017   Rating: 0.0 / 5    Votes: 0   Popularity: 0.0
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
The idea was good, but I think we could probably do something like below:public static string UsingStringJoin(IEnumerable sList, string separator){ return sList.Any() ? string.Join(separator, sList.ToArray()) : string.Empty;}public static string...

Mohammad A Rahman
Software Developer
Australia Australia
Member
Designer and Architect.
Author of the Expert C# 5.0: with the .NET 4.5 Framework book


Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 22 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid