Author: Reza Aghaei

I’ve been a .NET developer since 2004. During these years, as a developer, technical lead and architect, I’ve helped organizations and development teams in design and development of different kind of applications including LOB applications, Web and Windows application frameworks and RAD tools. As a teacher and mentor, I’ve trained tens of developers in C#, ASP.NET MVC and Windows Forms. As an interviewer I’ve helped organizations to assess and hire tens of qualified developers. I really enjoy learning new things, problem solving, knowledge sharing and helping other developers. I'm usually active in .NET related tags in stackoverflow to answer community questions. I also share technical blog posts in my blog as well as sharing sample codes in GitHub.

DataAnnotations Validation Attributes in Windows Forms

In this post, I’ll show how to use Data Annotation Validation attributes to perform validation in a Windows Forms Application. Data Annotation Validation attributes enable you to perform model validation simply by decorating class properties with validation attributes…

Read More »

How to get value of advanced power settings

Some times you may need to get value of advanced power settings in your application. For example you may want to know after how much idle time, the system will hibernate of sleep. Here in this post I’ll…

Read More »

Unit test a public method which relies on a protected method

Sometimes you need to write unit tests for a public method which is relying on some other protected methods. For example, lets say we have a business logic class which has a public GetGreatestId method, which returns the…

Read More »

Two-way data-binding to Dynamic Object

Dynamic Object Two Way Data Binding

To create a Dynamic Object which you can use for two-way data-binding to Windows Forms control, you should derive from DynamicObject and also implement ICustomTypeDescriptor and INotifyPropertyChanged interface. DynamicObject: Deriving from DynamicObject provides a solution for specifying dynamic…

Read More »

Auto-hide menu in Windows Forms

Some times you need to make the menu of the form auto hide to provide more space for other controls on the form. To show and hide the menu, it’s enough to set its Visible property. But to…

Read More »

How to get rid of BOM when downloading text from azure blob

When you download a text content using CloudBlockBlob.DownloadText() if the blob contains the BOM or byte order mark, then the returned text will contain some additional characters. For example in case of having UTF8 with BOM, you will…

Read More »

Default json formatter settings for HttpClient

When using Web API, after getting the response, to convert the response to a typed result, you can use ReadAsAsync<T> method of Content property of the response. Sometimes you need to deserialize the json result based on some…

Read More »

Open executable application on client using URL or Link

Sometimes you need a solution to open an application on client machine when user clicks on a link. It’s a common scenario in some cases. For example, you probably have seen mailto: url scheme. When you click on…

Read More »

Add custom menu item to IE context menu

You can add custom menu item to IE standard context menu to do some custom actions. For example you may want to add an item to open an executable program and do something based on selected text. As…

Read More »

Export SSL Certificate from Azure Web App

You can upload a pfx certificate into your Azure Web App. After you uploaded the certificate, if you open the context menu of the imported certificate, you will see the only available option is Delete. But how you…

Read More »