In computer programming, there are many techniques used by programmers to make their programming life easier and better. Various terms are used to convey the simplicity and compactness of a framework, such as Object-Oriented Programming. For example there are many possible methods to let you re-use the same functions and properties in your code, by inheriting the actual class and using those members, functions or properties, inside your derived class. But OOP has been very criticized for its reduced reusability. But that is not the topic of discussion.
Reusability
In programming, reusable code is the use of similar code in multiple functions. No, not by copying and then pasting the same code from one block to another and from there to another and so on. Instead, code reusability defines the methodology you can use to use similar code, without having to re-write it everywhere. As I have already said, not in a way to copy and paste it. There are many techniques to make code reusable in your applications. This technique follows the general programming philosophy of Don't Repeat Yourself (DRY) that states, “Every piece of knowledge must have a single, unambiguous, authoritative representation within a system” and helps developers to maintain the structure of their applications from being messed up and frustrating when debugging the applications. There are many scenarios and methods to do that.
- Inheritance
- Functions
- Libraries
- Forking
Inheritance
Inheritance has been in the programming world for quite a long time and is overly used in Object-Oriented Programming paradigms. This paradigm lets you use the base class's functions and members in other classes An Animal class is often used to describe this behavior. An Animal is used to inherit from for a Lion and a Human and many other types of Animals, each with their own different functions, like a Lion can roar and Humans can speak, but they all have something similar, they can all walk. So it is not necessary to write a walk function for all of these objects separately. You can instead create this function for an Animal and use it in your derived classes, Lion, Human and so on. Let us go through a code example of that.
- class Animal
- {
- // properties
- int legs;
- // functions
- void run()
- { /* code to run here.. */
- }
- }
- class Animal
- {
- public int Legs = 4;
- public void Run()
- {
- Console.WriteLine("Running...");
- }
- }
- class Human: Animal {}
- class Lion: Animal {}
Now this is just a complex way of ensuring that the members of the Animal class are available under the Human and Lion classes also. If you can the function Run over a Lion or Human object, you will see that it will Run. Although making the functions work for different objects differently is a totally different aspect of this, you need to implement virtual or abstract keywords to avail such functionality to allow the developer to override the functions (or members more specifically) and add the body of their own to write “Human running…” instead of just “Running…”.
Function calls
Function calls are another way of reusing the code from various parts of your application. You create small code blocks of an algorithm or logic-based source code and provide it a name, identifier. That identifies your code and can describe the process too. We have the following functions:
- A return type that denotes what type of data would be returned or a void.
- An identifier that is used to make a call to this function.
- Function body that is the code block containing the code to be executed when this function is called.
- Zero or more parameters to provide values to the code block variables.
- void greet()
- {
- // Greet user
- }
Libraries
Most of the framework allows support of creating third-party libraries the distribution of them using various methods. You can also note, that System (the namespace of the .NET Framework) is also present in the System.dll library.
Forking
Forking, well if you're a git geek, then you should know it better than me because I use Github's GUI version and I don't have much knowledge about the underlying git. But, forking is a process of using someone else's source code and making changes to it to fit your own needs, to distribute, use, share and so on.

Bhuvanesh MohankumarPosted May 10, 2016, 2:29 AM
Good one..
Sr KarthigaPosted Feb 14, 2016, 8:03 AM
Good one sir
Sujeet SumanPosted Sep 21, 2015, 11:55 AM
Nicely explained...........
Safayat ZisanPosted Apr 23, 2015, 7:33 AM
Nice writting of OOP features.
Yogendra YadavPosted Mar 30, 2015, 1:29 AM
nice article sir....
Khargesh RajputPosted Mar 29, 2015, 9:53 AM
Nice
Manish Kumar ChoudharyPosted Mar 29, 2015, 9:47 AM
Nice one.
Rahul Kumar SaxenaPosted Mar 29, 2015, 12:18 AM
Good Work
Pankaj Kumar ChoudharyPosted Mar 28, 2015, 8:58 PM
Nice article #Afzaal Sir........
Sam HobbsPosted Mar 28, 2015, 3:54 PM
On the subject of DLLs, every Windows API application communicates with Windows using a DLL. In other words, for applications, Windows is a set of DLLs.