O'Reilly logo

.NET Programming: A Practical Guide Using C# by Pradeep Tapadiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required