Sumedh Meshram

A Personal Blog

How Do Gantt Charts Make Project Managers’ Lives Easier?

Do you want to have a way to see how tasks are progressing? Want to see what roles are there in a project and how others depend on them? If you’ve always wanted a quick view of how far behind or ahead of schedule your project is, then it’s time for Gantt charts.

We believe that you might have already heard about Gantt charts considering their popularity in the project management domain. As a new project manager or team leader, it’s absolutely fair on your part to have some apprehensions about them.

Fret not, we are going to clear all your doubts regarding Gantt charts, the benefits they offer, and their purpose in project management in this post. Before that, let’s learn a little bit about their history.

Historical Background

People often think that Henry Gantt was the man behind the Gantt charts, but in reality, it was Karol Adamiecki, a Polish engineer who devised these charts for better planning in 1896.

Adamiecki published his work only in Polish and Russian and the first ever Gantt chart was named as the Harmonogram. After some years, Gantt started working on these charts and made them popular, thus the name "Gantt charts."

Why Use Gantt Charts in Project Management

The best thing about Gantt charts is that they are sufficient in equipping you with the right tools to plan, manage, and schedule projects. Gantt chart software also helps you to automate processes, create dependencies, add milestones, and identify critical paths.

A Visual Timeline of Tasks

Gantt charts provide a visual timeline of the project so that you can schedule your tasks, plan, and iterate your projects quickly and more efficiently. One gets to see an overview of milestones and other important information that provides a clear picture of who’s working on what and other deadlines related to them. Such information plays a key role in effective project planning and tracking by bringing together everything you need to meet deadlines and deliver projects successfully.

Keeps Everyone on The Same Page

With Gantt charts, you get a unified view of all the projects at one central place, making it easy for you to handle team planning and scheduling. Also, the visual nature of these charts makes it easier for people working together to set mutually agreed upon efforts and work in unison to achieve the desired goal. It reduces any chances of misunderstanding among team members while working on difficult tasks as everyone is already on the same page.

A Better Understanding of Task Relationships

Often, a task is both dependent and related to other tasks as well. These charts help you understand how various tasks are interrelated. They also help you set dependencies between different tasks to reflect how a change in their scheduling is going to impact the overall project progress of a project. With a better understanding of task relationships, one can assure optimum workflow and maximized productivity.

Allocate Resources Effectively

A Gantt chart software helps you delegate work items to different people and allocate resources in a way without overloading anyone. By appropriately following the chart, you can adjust or share resources if someone in a team needs help. If resources know what to do when and are managed properly, there is a better chance of completing the project on time and within the desired budget, too.

Seamless Communication

Anyone working on a project doesn’t have to run to another team member to ask a question; you can communicate easily and seamlessly with a Gantt chart software. Once a plan is devised, approved, and started, forget about remembering who’s working on what as the visual nature of Gantt charts tell everything you need to know at one place. That’s how Gantt charts have made things easier and stress-free for project managers so that they can focus on getting things done.

Track the Project Progress

Whether your project is small or complex, one of the crucial things for a project manager is to see how a project is progressing and whether things are on track or not. Gantt charts show the complete percentage of every task being handled by team members that give an estimation of the time needed to get tasks done. Gantt charts are indeed one of the safest bets to predict the project progress and see if you need to change your strategy or not.

More Accountability

Every Gantt chart software comes with easy drag-and-drop for efficient scheduling. Whether it’s about scheduling start and end dates to rescheduling them or setting dependencies, everything works well with Gantt charts. Team members get a sense of accountability while moving tasks and the task completion bar constantly reminds them to deliver a project before the deadline.

More Clarity, Less Confusion

Gantt charts are simple and straightforward. Apart from its intuitiveness, they use the critical chain to highlight important tasks. Gantt charts highlight the critical path that helps you identify tasks which are directly impacting the overall progress of a project. The clarity helps team members to know what’s working and what’s not so that they can change their strategy to achieve their goals. This lessens the confusion and brings more clarity in the process.

Complete Projects on Time

As Gantt charts provide a unified view of tasks, projects, and resources, they help you focus your precious time, effort, and brainpower on things that actually matter. When team members visualize their efforts in a project and how the progress of the entire project is somehow dependent on them, it provides real motivation to them.

Stay Ahead Always

Not only one can stay on top of things with Gantt charts but they also help project managers to stay ahead of their schedule if they follow Gantt charts precisely. Project managers can analyze the team performance and figure out patterns that must be readjusted for better output.


By now you might have understood the importance of Gantt charts in a project manager’s life. However, if your work revolves around complex projects, you might want to go for a task management software that enables more than using a Gantt chart. There are many project management solutions with elaborated features to choose from. Get a free trial, and make the best choice.

Reference :

What is the Most Popular Blockchain in the World?

Blockchain technology in on the rise and so are its applications, thanks to Bitcoin and Cryptocurrency for making blockchain a household name. The blockchain is not just an application. It is a technology that promises to bring trust, transparency, and accountability to digital transactions. Blockchain technology can be applied to almost any industry that involves digital transactions.

Most Popular Blockchain

In this article, I will review some of the most popular blockchains in the word.

If you’re new to Blockchain, I recommend start reading What Is Blockchain Technology.

Blockchain starts with Bitcoin. Bitcoin is one of the most searched keywords in Google. The following chart shows the popularity of blockchains.


The following Table lists the Top 15 most popular blockchains in the world. The report is based on the past 90 days of activity.




(Last 90 days)

Global volume

Traffic Rank




















































































































Please note, this report is based on an algorithm and data collected from various sources on the Internet. The rankings may change over time.

The Score of a blockchain is calculated based on the following factors.


  1. Keyword searches in Google
  2. Social media followers on various platforms
  3. Community size on platforms such as Twitter, Telegram, Discord
  4. Articles and content are written on the blockchain
  5. Market adoption and valuation
  6. CMC ranking
  7. Buzzwords and talk on the Web
  8. Meetup, user group events, hackathons, and conference participations


#1. Bitcoin 


Bitcoin King of Blockchain 

Bitcoin is the king of the blockchain. Bitcoin is the mother of all cryptocurrencies. Bitcoin is the reason we’re talking about blockchain today. Bitcoin was created by Satoshi Nakamoto and was released on Jan 9, 2009. Bitcoin is written in C++ programming language. Bitcoin project is an open source software project available to download from Github. Several cryptocurrencies have been created using the Bitcoin project and protocol. Blockchain has a limited supply of 21 million bitcoins.

Bitcoin is also a cryptocurrency, also known as digital currency, that is used for digital payments. Bitcoin’s market symbol is BTC. As of now, Bitcoin’s market cap is $64 billion. At one point in Jan 2018, Bitcoin’s market cap reached close to $330 billion when 1 BTC was close to US $21,000. Currently, 1 BTC trades around $3,600 according to CMC.

Bitcoin blockchain also has several forks. Some of the most popular Bitcoin forks are Bitcoin Cash, Bitcoin SV, Bitcoin Gold, and Bitcoin Diamond.

Bitcoin is an open source project available on Github for the public to download and get involved. Any developer can contribute to Bitcoin project. Thousands of developers have download Bitcoin project and have created their own versions of cryptocurrencies from the project.

Bitcoin was one of the most searched words on Google in 2018. Bitcoin’s global volume per month is 11 million searches with keyword difficulty of 96. The United States it the most popular country for Bitcoin followed by Germany, India, UK, and Brazil.

Bitcoin Global Volume 


Google Trends shows a significant drop in blockchain products searches from Jan 2018 to Jan 2019. The following graph shows a chart for Bitcoin, Ripple, Ethereum, EOS, and NEO from Jan 2018 to Jan 2019 and as you can see, the popularity of keywords have dropped to almost 95% within a year.

Blockchain Google TrendsIf you want to learn more about Bitcoin, check out What Is Bitcoin In Simplified Terms. 

#2. Ethereum 

Ethereum Blockchain 


Ethereum was created by Vitalik Buterin, Gavin Wood, and Joseph Lubin and was released to the public in 2015. Ethereum is written in Go, C++, and Rust.

Ethereum calls itself the “BLOCKCHAIN APP PLATFORM”. Ethereum is a decentralized software platform designed to create and execute digital smart contracts. Ethereum uses a new programming language called Solidity to write smart contracts. Ethereum blockchain is executed on the Ethereum Virtual Machine (EVM).

Ethereum has a cryptocurrency called Ether. Ether is the underlying token that fuels the Ethereum blockchain network. Ether’s public symbol is ETH. As of now, Current market cap of Ethereum is $13 billion. Currently, 1 ETH trades around $126 according to CMC. 

#3. EOSIO 

EOSIO Blockchain 


EOS.IO, authored by Daniel Larimer and Brendan Blumer, was developed by a private company, EOS was released to the public in 2018.

EOSIO calls itself “The most powerful infrastructure for decentralized applications”. EOS is an open source blockchain protocol that simulates an operating system and computer and allows developers to build decentralized software applications. EOS.IO is written in C++.

EOSIO is open source licensed under MIT software license. The software provides accounts, authentication, databases, asynchronous communication and the scheduling of applications across multiple CPU cores and/or clusters. The resulting technology is a blockchain architecture that has the potential to scale to millions of transactions per second, eliminates user fees and allows for quick and easy deployment of decentralized applications. 

#4. NEO 

NEO Blockchain 


NEO was authored by Da Hongfei and Erik Zhang and was released to the public in 2014. NEO is a blockchain platform and a cryptocurrency. NEO blockchain is designed to build decentralized apps.

NEO’s tagline is “An Open Network For Smart Economy”. NEO is an open source blockchain project available to download on Github. NEO is written in C#. NEO supports major popular programming languages including C#, JavaScript, Python, Java and Go.

NEO blockchain uses NEO tokens on the network that generates GAS tokens. GAS tokens are used to pay for transactions on the network. 

#5. TRON 

TRON Blockchain 


Raybo was founded in 2014 in Beijing and became China’s first blockchain company. TRON foundation was established in Singapore in 2017 and in Dec 2017, TRON launched its open source protocol. Justin Sun is the founder and CEO of TRON. TRON launched its MainNet on May 31, 2018.

TRON wants to “DECENTRALIZE THE WEB” and brands itself as, one of the largest blockchain-based operating systems in the world.


Key features of TRON are high throughput, high scalability, and high availability. TRON prides itself in higher TPS rate of 2,000 transactions per second, compared to Ethereum and Bitcoin at 35 TPS and 6 TPS per second.




This article lists the top 15 blockchains in the world based on their popularity. Bitcoin is the most popular blockchain in the world.

If you’re new to the blockchain, start with “What is Blockchain” and then read “Do I Need a Blockchain.”  

Further Blockchain Readings 

This article lists the top 15 blockchains in the world based on their popularity. Bitcoin is the most popular blockchain in the world.

What Is Blockchain

Do You Need a Blockchain

Top 5 Blockchain Programming Languages 



  • Wikipedia
  • Respective blockchain products websites and their documentation
  • Various traffic analytics and reporting tools
  • Social media websites
  • Community websites and discussion groups

5 Trends In Fintech You Will See In 2019

5 Trends In Fintech You Will See In 2019


This year, the word “fintech” was mentioned in a Union Budget speech for the first time ever. It was an ambiguous 20th-century portmanteau. Today, fintech has pervaded our daily lives, impacting everyday money decisions. Fintech is the way to go for the financial empowerment of hundreds of millions of Indians.

Here’s how I feel 2019 would progress for the industry.

Consumer Traction Will Continue To Grow

More and more Indians will continue to turn to the internet to solve their money management problems. For millennials born in the age of the internet, their Internet-connected smartphones will be the gateway to the financial services industry.

Not just that, the number of internet users in India will continue to grow at a rapid pace: 500 Mn in 2018 as per IAMAI projections, and 700 Mn by 2020, as per other projections. Fintech will continue to churn out solutions for the internet-connected Indian.

Short-Term Lending To Gain Pace

Payday loans – short-term, unsecured loans – have been around for long in the west. But they’ve only recently started becoming popular in India. You’ll see not just the proliferation of lending startups but also see mainstream banks evolving short-term lending products.


Paperless Is Accelerating

The only way forward for fintech is paperless. A consumer should be able to buy her financial service from her smartphone, paperlessly, presence-lessly, without having to submit a sheet of paper or meeting a bank salesperson.

The Aadhaar verdict this year has shaped how eKYC for new account openings is done. New techniques of eKYC have also evolved, and we’re expecting to see some of them in action soon. For example, you may be able to complete your verification through video KYC.

Work is also going on towards making offline Aadhaar a possibility, wherein a user would be able to control the Aadhaar information she wishes to share with a service provider via XML. Offline Aadhaar will allow authentication without biometrics or the sharing of the Aadhaar number.

PMLA Amendments To Enable Paperless Banking

The Modi government has made amendments to the Telegraph Act as well as the Prevention of Money Laundering Act, following the Supreme Court’s Aadhaar verdict. This will pave way for the voluntary use of Aadhaar for new phone connections and bank accounts.

Therefore, not only will customers be able to instantly open accounts, there are now steeper penalties on entities who misuse Aadhaar data or business who withhold services for not sharing Aadhaar.

India is rapidly moving to paperless, presence-less delivery of financial products. With more first-time internet users entering the market, expect more developments and innovation in the customer onboarding space.

An employee walked into my room today and said, "I want to Quit".

An employee walked into my room today and said, " I want to Quit".

I looked at him and asked for a reason.

 He said, " Culture in the office is too demotivating. People are gossiping and have no interest in their work. I think I am losing my skill set."

I smiled and said, "Fine!". But before you put down your papers, carry a glass full of water in your hand and take 3 rounds in the office making sure you don't spill even a single drop of water on the ground.

He was confused but agreed.

He came back after some time and kept the glass on the table. 

I asked him while you were taking rounds did you see anyone gossiping or did anyone disturb you.

He said NO. Rather I didn't notice because I wanted to make sure that water doesn't fall on the ground

So that is the point. If you are too focused on the job in hand, then external things won't disturb you at all.

So stay focused and keep working.

Success will come your way.

Thank you All

Thank you all, the Team of doctors @Dr. Ketan Chaturvedi @Dr. Suhas Salpekar @Dr. Tushar Pande and @Wockhardt hospital team (they stayed available 24X7) when I was under tremendous pain anytime and they show patience while treating an irascible person like me. A Special thanks to @Dr. Sushant Admane my chaddi buddy friend my brother from another mother who co-ordinates throughout the teams of doctors around the world so I can get the best possible treatments from such a unique health issue. Lastly, thanks to my family and friend who supported me as always to come out from this situation. Thanks Again to All... :) Stay Healthy 

TECHGIG : Code Contest HomeThe Great Indian Programming League 2013 - May Edition - Visit a Colony

Problem Statement :

In a colony all houses are in a single line. We call a house either in a good condition or in a bad condition. If a house is good its score is 1 otherwise 0. We decided to perform the scoring of houses in a different way. 

We not only consider that particular house but also the 2 neighboring house.
New scoring strategy- The Score of a house if affected by three house, that house and its two neighbors
Score-1 : If any of the three houses is in good condition 
Score-2 : if any of the two houses is in good condition 
Score-3 : if all the three houses are in good condition 
Now Josheph has the score list of all the houses ( according to new strategy ) and he wants to know what is the condition ( good or bad) of his house just seeing the score of the houses. He assumes that first house is in good condition.


Successfully compiledSuccessfully compiled
: 9: 90
Solution :
using System;
public class CandidateCode
public static int house_condition(int[] input1,int input2)
int[] score = new int[input1.Length];	
for(int i=0;i<input1.Length;i++)
if(i == 0)
score[i] = 1; //first house in good condition

score[i+1] = input1[i]- score[i];	
score[i+1] = input1[i] - (score[i-1] + score[i]);
return score[input2-1];	

The Partition Problem - Algorithm [Solved]

Partition Problem Problem

Partition problem is the task of deciding whether a given multiset of positive integers can be partitioned into two subsets S1 and S2 such that the sum of the elements in S1 equals the sum of the elements in S2.

using System;
using System.Linq;
public class CandidateCode
	public static string partition(int[] input1)
		bool[] best_assignment = PartitionValues(input1);
		string result1 = "", result2 = "";
            	int total1 = 0, total2 = 0;
            	for (int i = 0; i < best_assignment.Length; i++)
	        	 if (best_assignment[i])
	    		   result1 += "\r\n " + input1[i];
	    		   total1 += input1[i];
	         	   result2 += "\r\n " + input1[i];
	               	   total2 += input1[i];
            if (result1.Length > 0) result1 = result1.Substring(2);
            if (result2.Length > 0) result2 = result2.Substring(2);

		return "{"+ result1 + " } {" + result2 + " } total  " + total1.ToString() + " & " + total2.ToString();
	private static bool[] PartitionValues(int[] values)
		bool[] best_assignment = new bool[values.Length];
            	bool[] test_assignment = new bool[values.Length];
               	int total_value = values.Sum();

            	int best_err = total_value;
            	PartitionValuesFromIndex(values, 0, total_value, test_assignment, 0, ref best_assignment, ref best_err);
            	return best_assignment;
private static void PartitionValuesFromIndex(int[] values, int start_index, int total_value,
            bool[] test_assignment, int test_value,
            ref bool[] best_assignment, ref int best_err)
            // If start_index is beyond the end of the array,
            // then all entries have been assigned.
            if (start_index >= values.Length)
                // We're done. See if this assignment is better than what we have so far.
                int test_err = Math.Abs(2 * test_value - total_value);
                if (test_err < best_err)
                    // This is an improvement. Save it.
                    best_err = test_err;
                    best_assignment = (bool[])test_assignment.Clone();
                // Try adding values[start_index] to set 1.
                test_assignment[start_index] = true;
                PartitionValuesFromIndex(values, start_index + 1, total_value,
                    test_assignment, test_value + values[start_index],
                    ref best_assignment, ref best_err);

                // Try adding values[start_index] to set 2.
                test_assignment[start_index] = false;
                PartitionValuesFromIndex(values, start_index + 1, total_value,
                    test_assignment, test_value,
                    ref best_assignment, ref best_err);

Implementing Singleton in C#

Implementing Singleton in C#


You are building an application in C#. You need a class that has only one instance, and you need to provide a global point of access to the instance. You want to be sure that your solution is efficient and that it takes advantage of the Microsoft .NET common language runtime features. You may also want to make sure that your solution is thread safe.

Implementation Strategy

Even though Singleton is a comparatively simple pattern, there are various tradeoffs and options, depending upon the implementation. The following is a series of implementation strategies with a discussion of their strengths and weaknesses.


The following implementation of the Singleton design pattern follows the solution presented in Design Patterns: Elements of Reusable Object-Oriented Software [Gamma95] but modifies it to take advantage of language features available in C#, such as properties:


using System;

public class Singleton
   private static Singleton instance;

   private Singleton() {}

   public static Singleton Instance
         if (instance == null)
            instance = new Singleton();
         return instance;

This implementation has two main advantages:

  • Because the instance is created inside the Instance property method, the class can exercise additional functionality (for example, instantiating a subclass), even though it may introduce unwelcome dependencies.

  • The instantiation is not performed until an object asks for an instance; this approach is referred to as lazy instantiation. Lazy instantiation avoids instantiating unnecessary singletons when the application starts.


The main disadvantage of this implementation, however, is that it is not safe for multithreaded environments. If separate threads of execution enter the Instance property method at the same time, more that one instance of the Singleton object may be created. Each thread could execute the following statement and decide that a new instance has to be created:

if (instance == null)

Various approaches solve this problem. One approach is to use an idiom referred to as Double-Check Locking [Lea99]. However, C# in combination with the common language runtime provides a static initialization approach, which circumvents these issues without requiring the developer to explicitly code for thread safety.

Static Initialization



One of the reasons Design Patterns [Gamma95] avoided static initialization is because the C++ specification left some ambiguity around the initialization order of static variables. Fortunately, the .NET Framework resolves this ambiguity through its handling of variable initialization:


public sealed class Singleton
   private static readonly Singleton instance = new Singleton();
   private Singleton(){}

   public static Singleton Instance
         return instance; 

In this strategy, the instance is created the first time any member of the class is referenced. The common language runtime takes care of the variable initialization. The class is marked sealed to prevent derivation, which could add instances. For a discussion of the pros and cons of marking a class sealed, see [Sells03]. In addition, the variable is marked readonly, which means that it can be assigned only during static initialization (which is shown here) or in a class constructor.

This implementation is similar to the preceding example, except that it relies on the common language runtime to initialize the variable. It still addresses the two basic problems that the Singleton pattern is trying to solve: global access and instantiation control. The public static property provides a global access point to the instance. Also, because the constructor is private, the Singleton class cannot be instantiated outside of the class itself; therefore, the variable refers to the only instance that can exist in the system.

Because the Singleton instance is referenced by a private static member variable, the instantiation does not occur until the class is first referenced by a call to the Instanceproperty. This solution therefore implements a form of the lazy instantiation property, as in the Design Patterns form of Singleton.

The only potential downside of this approach is that you have less control over the mechanics of the instantiation. In the Design Patterns form, you were able to use a nondefault constructor or perform other tasks before the instantiation. Because the .NET Framework performs the initialization in this solution, you do not have these options. In most cases, static initialization is the preferred approach for implementing a Singleton in .NET.

Multithreaded Singleton



Static initialization is suitable for most situations. When your application must delay the instantiation, use a non-default constructor or perform other tasks before the instantiation, and work in a multithreaded environment, you need a different solution. Cases do exist, however, in which you cannot rely on the common language runtime to ensure thread safety, as in the Static Initialization example. In such cases, you must use specific language capabilities to ensure that only one instance of the object is created in the presence of multiple threads. One of the more common solutions is to use the Double-Check Locking [Lea99] idiom to keep separate threads from creating new instances of the singleton at the same time.


Note: The common language runtime resolves issues related to using Double-Check Locking that are common in other environments. For more information about these issues, see "The 'Double-Checked Locking Is Broken' Declaration," on the University of Maryland, Department of Computer Science Web site, at


The following implementation allows only a single thread to enter the critical area, which the lock block identifies, when no instance of Singleton has yet been created:


using System;

public sealed class Singleton
   private static volatile Singleton instance;
   private static object syncRoot = new Object();

   private Singleton() {}

   public static Singleton Instance
         if (instance == null) 
            lock (syncRoot) 
               if (instance == null) 
                  instance = new Singleton();

         return instance;

This approach ensures that only one instance is created and only when the instance is needed. Also, the variable is declared to be volatile to ensure that assignment to the instance variable completes before the instance variable can be accessed. Lastly, this approach uses a syncRoot instance to lock on, rather than locking on the type itself, to avoid deadlocks.

This double-check locking approach solves the thread concurrency problems while avoiding an exclusive lock in every call to the Instance property method. It also allows you to delay instantiation until the object is first accessed. In practice, an application rarely requires this type of implementation. In most cases, the static initialization approach is sufficient.

Resulting Context

Implementing Singleton in C# results in the following benefits and liabilities:



  • The static initialization approach is possible because the .NET Framework explicitly defines how and when static variable initialization occurs.

  • The Double-Check Locking idiom described earlier in "Multithreaded Singleton" is implemented correctly in the common language runtime.




If your multithreaded application requires explicit initialization, you have to take precautions to avoid threading issues.


[Gamma95] Gamma, Helm, Johnson, and Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1995.

[Lea99] Lea, Doug. Concurrent Programming in Java, Second Edition. Addison-Wesley, 1999.

[Sells03] Sells, Chris. "Sealed Sucks." News. Available at:



Inheritance :

  • Inheritance is a way to form new classes (instances of which are called objects) using classes that have already been defined.
  • Inheritance is employed to help reuse existing code with little or no modification.
  • The new classes, known as Sub-class or derived class, inherit attributes and behavior of the pre-existing classes, which are referred to as Super-class or Base class.

C# supports two types of Inheritance mechanisms

  1. Implementation Inheritance
  2. Interface Inheritance

Implementation Inheritance:

When a class (type) is derived from another class (type) such that it inherits all the members of the base type it is Implementation Inheritance

Interface Inheritance:

When a type (class or a struct) inherits only the signatures of the functions from another type it is Interface Inheritance.

Benefits of using Inheritance

  • Once a behavior (method) or property is defined in a super class (base class),that behavior or property is automatically inherited by all subclasses (derived class).
  • Code reusability increased through inheritance
  • Inheritance provide a clear model structure which is easy to understand without much complexity
  • Using inheritance, classes become grouped together in a hierarchical tree structure
  • Code are easy to manage and divided into parent and child classes
public class ParentClass
    public ParentClass()
        Console.WriteLine("Parent Constructor.");
    public void print()
        Console.WriteLine("Parent Class.");
public class ChildClass : ParentClass
    public ChildClass()
        Console.WriteLine("Child Constructor.");
    public static void Main()
        ChildClass child = new ChildClass();


Parent Constructor.

Child Constructor.

Parent Class.


  • Encapsulation is a procedure of covering up of the data & functions into a single unit called as class 
  • An encapsulated object is often called an abstract data type. 
  • Encapsulation can protect your data from accidental corruption. 
  • Rather than defining the data in the form of public, we can declare those fields as private.

Code Example :

public class School
	private string Schooldepartname;
	public string SchoolDepartname
			return Schooldepartname;
			Schooldepartname =value;
public class Departmentmain
	public static int Main(string[] args)
		School d= new School();
		Console.WriteLine("The Dept. Name is :{0}",d.SchoolDepartname);
		return 0;



The Dept. Name is : Communication

Benefits of Encapsulation :

  • In Encapsulation fields of a class can be read-only or can be write-only.
  • A class can have control over in its fields.
  • A class can change data type of its fields anytime but users of this class do not need to change any code.

From the above we can see the use of Encapsulation by using properties. The property has two accessor get and set. The get accessor returns the value of the some property field. The set accessor sets the value of the some property field with the contents of "value". Properties can be made read-only. This is accomplished by having only a get accessor in the property implementation.

Cheap MLB Jerseys maillot de foot pas cher