Tag archive for: C#

How to interact with applications via command line in C#

As with most programming languages, C# has the facilities to start other applications via command line. Such facilities may not be of much interest to the ardent C# programmer, who will want to fulfill every business logic with purely C# codes in his/her program. However, there are times when it is necessary to interface with applications that other people had already built for us.

How to read from file in C#

The ability to read from file gives our C# programs the ability to act on data given by other programs, which may be written in different programming languages.

Such a ability is also helpful in allowing humans to configure how our C# program will behave at runtime.

Since being able to read from file is so helpful in C#, I want to remember how I can do that with this post.

How to build a web based user interaction layer in C#

With the ubiquity of web browsers, it can be ideal for the user interaction layer of applications to be web based. The most common approaches to building web based applications is to write server side scripts running on web servers. However, these approaches require server programs to be present in the production environment.

What if you want the web server functionality to be contained in your C# program? In C#, there is a System.Net.HttpListener class which listens for HTTP requests from clients.

This post is part 1 of the sequel. In this post, I will introduce the HttpListener class and how we can use it to receive HTTP requests from clients in our C# program.