Once a component is designed it can be reused from any kind of application like in console application or windows application or web application or device application etc.
Once a component is designed in any programming language of .net it can be reused from any other programming languages of .Net; i.e., .Net components or assemblies will provide language interoperability.
To create components in .Net, we use class library templates.
End user will never interact with some applications; but will interact with components or DLL.
End user will never interact with some applications; but will interact with components or DLL.
Program for creating a Component / Assembly
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace CLibMaths
- {
- public class Arithmatic
- {
- public int Num1, Num2, Result;
- public int PNum1
- {
- set {
- Num1 = value;
- }
- get {
- return Num1;
- }
- }
- public int PNum2 {
- set {
- Num2 = value;
- }
- }
- public int PResult {
- get {
- return Result;
- }
- }
- public int Add() {
- Result = Num1 + Num2;
- return Result;
- }
- public void Subtract() {
- Result = Num1 - Num2;
- }
- public void Multiply() {
- Result = Num1 * Num2;
- }
- public void Divide() {
- Result = Num1 / Num2;
- }
- }
- }

Join the conversation! Your thoughts help the community grow.