Common Programming Paradigms

In this section, we explore some common programming paradigms under .NET

Client–Server Programming

Software engineering, to a large extent, is about writing software such that generic code can be reused in multiple applications. Let's rewrite the very first program we wrote. This time we factor out the logic for greeting the user. The intent is to provide the ability to reuse this greeting code in any other application.

We first develop a console-based application.

Console-Based Greeting

Here is our new class that implements the greeting logic:

 // Project ReusableCode, File ConsoleGreeting.cs using System; namespace MyGreeting { class ConsoleGreeting { private String m_userName; public void Greet() { Console.WriteLine("Hello ...

Get .NET Programming: A Practical Guide Using C# now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.