C#
Q: Method Hiding vs Method Overriding
<div><table class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0" style="border: none;">
<tbody><tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;height:15.2pt">
<td width="304" valign="top" style="width: 227.65pt; border-width: 1pt; border-color: windowtext; padding: 0in 5.4pt; height: 15.2pt;">
<div><b><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif"">Method Hiding<o:p></o:p></span></b></div>
</td>
<td width="304" valign="top" style="width: 227.65pt; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-top-color: windowtext; border-right-color: windowtext; border-bottom-color: windowtext; border-left: none; padding: 0in 5.4pt; height: 15.2pt;">
<div><b><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif"">Method Overriding<o:p></o:p></span></b></div>
</td>
</tr>
<tr style="mso-yfti-irow:1;height:13.9pt">
<td width="304" valign="top" style="width: 227.65pt; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-top: none; padding: 0in 5.4pt; height: 13.9pt;">
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold">In child call, we use a </span><b><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif"">new</span></b><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> keyword instead
of an </span><b><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-bidi-font-style:
italic">override</span></b><span lang="EN-IN" style="font-size:10.0pt;
font-family:"Arial","sans-serif";mso-bidi-font-weight:bold">.<o:p></o:p></span></div>
</td>
<td width="304" valign="top" style="width: 227.65pt; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; padding: 0in 5.4pt; height: 13.9pt;">
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> </span></div>
</td>
</tr>
<tr style="mso-yfti-irow:2;height:24.25pt">
<td width="304" valign="top" style="width: 227.65pt; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-top: none; padding: 0in 5.4pt; height: 24.25pt;">
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold">Calling the common name method from the parent class
instance will hide the child class implementation. <o:p></o:p></span></div>
</td>
<td width="304" valign="top" style="width: 227.65pt; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; padding: 0in 5.4pt; height: 24.25pt;">
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> </span></div>
</td>
</tr>
<tr style="mso-yfti-irow:3;mso-yfti-lastrow:yes;height:224.5pt">
<td width="304" valign="top" style="width: 227.65pt; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-top: none; padding: 0in 5.4pt; height: 224.5pt;">
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold">public class </span><b><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif"">Parent</span></b><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"><o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> {<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold">
public void Show()<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> {<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold">Console.WriteLine("Show From Parent");<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> }<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> }<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> </span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> public
class </span><b><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif"">Child: Parent</span></b><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"><o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> {<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold">
public </span><b><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";background:yellow;
mso-highlight:yellow">new</span></b><span lang="EN-IN" style="font-size:10.0pt;
font-family:"Arial","sans-serif";mso-bidi-font-weight:bold"> void Show()<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> {<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold">Console.WriteLine("Show From Child");<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> }<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> }<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> </span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> public
class User<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> {<o:p></o:p></span></div>
<div><b><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif""> Parent p = new Child();<o:p></o:p></span></b></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold">
public void ShowData()<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> {<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold">p.Show(); // <span style="background:lime;
mso-highlight:lime">OUTPUT: Show From Parent.</span><o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> } <o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> }</span><b><span lang="EN-IN" style="font-size:10.0pt;
font-family:"Arial","sans-serif""><o:p></o:p></span></b></div>
</td>
<td width="304" valign="top" style="width: 227.65pt; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; padding: 0in 5.4pt; height: 224.5pt;">
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> public
class </span><b><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif"">Parent2</span></b><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"><o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> {<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold">
public </span><b><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";background:aqua;
mso-highlight:aqua">virtual</span></b><span lang="EN-IN" style="font-size:10.0pt;
font-family:"Arial","sans-serif";mso-bidi-font-weight:bold"> void Show()<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> {<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold">Console.WriteLine("Show From Parent");<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> }<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> }<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> </span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> public
class Child2 : Parent2<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> {<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> public </span><b><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
background:aqua;mso-highlight:aqua">override</span></b><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-bidi-font-weight:
bold"> void Show()<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> {<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold">Console.WriteLine("Show From Child");<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> }<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> }<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> </span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> public
class User2<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> {<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold">
Parent2 p = new Child2();<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold">
public void ShowData()<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> {<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold">p.Show(); // <span style="background:lime;
mso-highlight:lime">OUTPUT: Show From Child.</span><o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> }<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif";
mso-bidi-font-weight:bold"> }</span><b><span lang="EN-IN" style="font-size:10.0pt;
font-family:"Arial","sans-serif""><o:p></o:p></span></b></div>
</td>
</tr>
</tbody></table></div>
Q:
<div><span style="color: inherit; font-family: Poppins, sans-serif; font-size: 22px;"></span><h4><span style="color: inherit;">1. Virtual</span><br></h4></div><div><div><b><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif""></span></b><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif""> - Method and property provide option of overriding to the child classes.</span></div><div><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif""><br></span></div><h4>
2. Private Constructor</h4><div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Courier New";
mso-fareast-font-family:"Courier New";mso-bidi-font-weight:bold">o<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif"">Class with a private
constructor cannot be instantiated, never be inherited.<o:p></o:p></span></div><div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Courier New";
mso-fareast-font-family:"Courier New";mso-bidi-font-weight:bold">o<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif"">We can’t create an object of
this class.<o:p></o:p></span></div><div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Courier New";
mso-fareast-font-family:"Courier New";mso-bidi-font-weight:bold">o<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif"">Private constructors are
used when we want only 1 instance of the class to be created and externally no
one can use the new keyword.<o:p></o:p></span></div><div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Courier New";
mso-fareast-font-family:"Courier New";mso-bidi-font-weight:bold">o<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif"">Generally used for Utility,
Helper or Common Classes in program.</span></div></div><div><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif""><br></span></div><h4>
3. Jagged Arrays:</h4><div><div><span lang="EN-IN" style="font-size: 12pt; line-height: 107%; font-family: Arial, "sans-serif"; color: rgb(34, 34, 34); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><b></b> -Defined as array of arrays. The elements of a
jagged array can be of different dimensions and sizes.<o:p></o:p></span></div>
<h4><br></h4><h4>4. Array vs ArrayList: </h4><span style="font-size:16px;">
The array is strongly typed whereas ArrayList can store any type of items\elements thus Boxing / UnBoxing Required in array list</span><div><span lang="EN-IN" style="font-size: 12pt; line-height: 107%; font-family: Arial, "sans-serif"; color: rgb(34, 34, 34); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">..<o:p></o:p></span></div>
<table class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0" style="margin-left: 0.3in; border: none;">
<tbody><tr>
<td width="285" valign="top" style="width: 213.75pt; border-width: 1pt; border-color: windowtext; padding: 0in 5.4pt;">
<div><b><span lang="EN-IN" style="font-size: 12pt; font-family: Arial, "sans-serif"; color: rgb(34, 34, 34); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">Array
(Type Safe)<o:p></o:p></span></b></div>
</td>
<td width="287" valign="top" style="width: 215.45pt; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-top-color: windowtext; border-right-color: windowtext; border-bottom-color: windowtext; border-left: none; padding: 0in 5.4pt;">
<div><b><span lang="EN-IN" style="font-size: 12pt; font-family: Arial, "sans-serif"; color: rgb(34, 34, 34); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">ArrayList
(Not Type Safe)<o:p></o:p></span></b></div>
</td>
</tr>
<tr>
<td width="285" valign="top" style="width: 213.75pt; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-top: none; padding: 0in 5.4pt;">
<div><span lang="EN-IN" style="font-size: 12pt; font-family: Arial, "sans-serif"; color: rgb(34, 34, 34); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">System
namespace<o:p></o:p></span></div>
</td>
<td width="287" valign="top" style="width: 215.45pt; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; padding: 0in 5.4pt;">
<div><span lang="EN-IN" style="font-size: 12pt; font-family: Arial, "sans-serif"; color: rgb(34, 34, 34); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">System.Collections
namespace<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td width="285" valign="top" style="width: 213.75pt; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-top: none; padding: 0in 5.4pt;">
<div><span lang="EN-IN" style="font-size: 12pt; font-family: Arial, "sans-serif"; color: rgb(34, 34, 34); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">Array Declaration & Initialization:<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size: 12pt; font-family: Arial, "sans-serif"; color: rgb(34, 34, 34); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">int[] arr = new int[5]<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size: 12pt; font-family: Arial, "sans-serif"; color: rgb(34, 34, 34); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">int[] arr = new int[5]{1, 2, 3, 4, 5}; int[] arr = {1, 2, 3, 4, 5};<o:p></o:p></span></div>
</td>
<td width="287" valign="top" style="width: 215.45pt; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; padding: 0in 5.4pt;">
<div><span lang="EN-IN" style="font-size: 12pt; font-family: Arial, "sans-serif"; color: rgb(34, 34, 34); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">ArrayList Declaration & Initialization:<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size: 12pt; font-family: Arial, "sans-serif"; color: rgb(34, 34, 34); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">ArrayListarList = new ArrayList();<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size: 12pt; font-family: Arial, "sans-serif"; color: rgb(34, 34, 34); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">arList.Add(1);<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size: 12pt; font-family: Arial, "sans-serif"; color: rgb(34, 34, 34); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">arList.Add("Two");<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size: 12pt; font-family: Arial, "sans-serif"; color: rgb(34, 34, 34); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">arList.Add(false);<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div><b><span lang="EN-IN" style="line-height: 107%; color: rgb(34, 34, 34);"><span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-size: 16px;"><font face="Arial, sans-serif"><br></font></span></span></b></div><div><b><span lang="EN-IN" style="line-height: 107%; color: rgb(34, 34, 34);"><span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-size: 16px;"><font face="Arial, sans-serif">5.</font></span><span style="font-family: "Times New Roman"; font-size: 7pt; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal;"> </span></span></b><!--[endif]--><span lang="EN-IN" style="font-size: 12pt; line-height: 107%; font-family: Arial, "sans-serif"; color: rgb(34, 34, 34); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">Is string value type or a reference type?<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:12.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana;color:#222222">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 12pt; line-height: 107%; font-family: Arial, "sans-serif"; color: rgb(34, 34, 34); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">.Net Framework <b>Strings</b> are immutable <b>reference
types</b>.<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:12.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana;color:#222222">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 12pt; line-height: 107%; font-family: Arial, "sans-serif"; color: rgb(34, 34, 34); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"> All .net datatypes has default
size except <b>string</b> and user <b>type</b>.<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:12.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana;color:#222222">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 12pt; line-height: 107%; font-family: Arial, "sans-serif"; color: rgb(34, 34, 34); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">So <b>String</b> is a <b>Reference type</b>, because it’s
does not have default allocation size.<o:p></o:p></span></div>
<div><b><span lang="EN-IN" style="font-size:12.0pt;
line-height:107%;font-family:"Arial","sans-serif";mso-fareast-font-family:Arial;
color:#212121"><br></span></b></div><div><b><span lang="EN-IN" style="font-size:12.0pt;
line-height:107%;font-family:"Arial","sans-serif";mso-fareast-font-family:Arial;
color:#212121"><br></span></b></div><div><b><span lang="EN-IN" style="font-size:12.0pt;
line-height:107%;font-family:"Arial","sans-serif";mso-fareast-font-family:Arial;
color:#212121">6.<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span></b><!--[endif]--><b><span lang="EN-IN" style="font-size: 12pt; line-height: 107%; font-family: Arial, "sans-serif"; color: rgb(33, 33, 33); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">ENUM:</span></b><span lang="EN-IN" style="font-size:12.0pt;line-height:107%;font-family:"Arial","sans-serif""><br>
<span style="color: rgb(33, 33, 33); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">An enum is a value type with a set
of related named constants often referred to as an enumerator list. enums
are <b>enumerated data type</b> in c#. Enums are <b>value types</b> and are
created on the <b>stack and not on the heap</b>. </span></span></div></div><div><span lang="EN-IN" style="font-size:12.0pt;line-height:107%;font-family:"Arial","sans-serif""><span style="color: rgb(33, 33, 33); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><br></span></span></div><h4>
7. Types Of Collections</h4><div><b style="font-family: Arial, "sans-serif"; font-size: 12pt;"><u><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;"></span></u></b><br></div><div><span lang="EN-IN" style="line-height: 107%;"><span style="color: rgb(33, 33, 33); background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><b><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">Generic</span></b><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:Wingdings;
mso-ascii-font-family:Arial;mso-hansi-font-family:Arial;mso-bidi-font-family:
Arial;mso-char-type:symbol;mso-symbol-font-family:Wingdings">à</span><b><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;"> </span></b><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">Dictionary
|| <b>Non-Generic </b></span><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:Wingdings;
mso-ascii-font-family:Arial;mso-hansi-font-family:Arial;mso-bidi-font-family:
Arial;mso-char-type:symbol;mso-symbol-font-family:Wingdings">à</span><b><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;"> </span></b><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">Hash
Table, ArrayList<b><u><o:p></o:p></u></b></span></div>
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><b><span lang="EN-IN" style="font-size: 10pt; line-height: 107%; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">Dictionary
vs Hashtable: </span></b><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;"><o:p></o:p></span></div>
<table class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0" style="font-family: Arial, "sans-serif"; font-size: 12pt; margin-left: 0.3in; border: none;">
<tbody><tr>
<td width="301" valign="top" style="width: 225.4pt; border-width: 1pt; border-color: windowtext; padding: 0in 5.4pt;">
<div><b><span lang="EN-IN" style="font-size: 10pt; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">Dictionary<o:p></o:p></span></b></div>
</td>
<td width="301" valign="top" style="width: 225.4pt; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-top-color: windowtext; border-right-color: windowtext; border-bottom-color: windowtext; border-left: none; padding: 0in 5.4pt;">
<div><b><span lang="EN-IN" style="font-size: 10pt; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">Hash Table<o:p></o:p></span></b></div>
</td>
</tr>
<tr>
<td width="301" valign="top" style="width: 225.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-top: none; padding: 0in 5.4pt;">
<div><span lang="EN-IN" style="font-size: 10pt; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">Generic
Type<o:p></o:p></span></div>
</td>
<td width="301" valign="top" style="width: 225.4pt; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; padding: 0in 5.4pt;">
<div><span lang="EN-IN" style="font-size: 10pt; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">Not
Generic<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td width="301" valign="top" style="width: 225.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-top: none; padding: 0in 5.4pt;">
<div><span lang="EN-IN" style="font-size: 10pt; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">Strongly
Type data structure<o:p></o:p></span></div>
</td>
<td width="301" valign="top" style="width: 225.4pt; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; padding: 0in 5.4pt;">
<div><span lang="EN-IN" style="font-size: 10pt; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">Weakly
typed data structure<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td width="301" valign="top" style="width: 225.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-top: none; padding: 0in 5.4pt;">
<div><span lang="EN-IN" style="font-size: 10pt; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"><TKey,
TValue> Must specify the data types for both key and value<o:p></o:p></span></div>
</td>
<td width="301" valign="top" style="width: 225.4pt; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; padding: 0in 5.4pt;">
<div><span lang="EN-IN" style="font-size: 10pt; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">Add
keys and values of any Object Type to the Hashtable<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><b><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;"><br></span></b></div><div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><b><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;"><br></span></b></div><div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><b><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">8. Can we have different access
modifiers on get/set methods of a property? <o:p></o:p></span></b></div>
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">YES.<b><u><o:p></o:p></u></b></span></div><div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;"><br></span></div><div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;"><br></span></div>
<h4>9. Structure VS Class
</h4><div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">Difference.<o:p></o:p></span></div>
<table class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0" style="font-family: Arial, "sans-serif"; font-size: 12pt; margin-left: 21.05pt; border: none;">
<tbody><tr>
<td width="255" valign="top" style="width: 191.35pt; border-width: 1pt; border-color: windowtext; padding: 0in 5.4pt;">
<div><b><span lang="EN-IN" style="font-size: 10pt;">Structure<o:p></o:p></span></b></div>
</td>
<td width="318" valign="top" style="width: 238.4pt; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-top-color: windowtext; border-right-color: windowtext; border-bottom-color: windowtext; border-left: none; padding: 0in 5.4pt;">
<div><b><span lang="EN-IN" style="font-size: 10pt;">Class<o:p></o:p></span></b></div>
</td>
</tr>
<tr style="mso-yfti-irow:1;mso-yfti-lastrow:yes;height:58.1pt">
<td width="255" valign="top" style="width: 191.35pt; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-top: none; padding: 0in 5.4pt; height: 58.1pt;">
<div><b><span lang="EN-IN" style="font-size: 10pt;">Value</span></b><span lang="EN-IN" style="font-size: 10pt;"> Type<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size: 10pt;">Can’t
do inheritance <o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size: 10pt;">Not
required Constructors<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size: 10pt;">Members
can’t be declared as <b>protected</b><o:p></o:p></span></div>
</td>
<td width="318" valign="top" style="width: 238.4pt; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; padding: 0in 5.4pt; height: 58.1pt;">
<div><b><span lang="EN-IN" style="font-size: 10pt;">Reference</span></b><span lang="EN-IN" style="font-size: 10pt;"> Type<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size: 10pt;">Can
do inheritance<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size: 10pt;">Require
constructors<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size: 10pt;">Can
be declared as <b>protected</b><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><b><u><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;"><br></span></u></b></div><div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><b><u><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">The similarity between Class and
structure.<o:p></o:p></span></u></b></div>
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">Both can have constructors,
methods, properties, fields, constants, enumerations, events, and event
handlers.<o:p></o:p></span></div>
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">Structures and classes can
implement the interface.<o:p></o:p></span></div>
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">Have delegates and events.<o:p></o:p></span></div>
<h4><br></h4><h4>
10. Ref vs Out
</h4><table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="672" style="font-family: Arial, "sans-serif"; font-size: 12pt; width: 7in; margin-left: 4.65pt;">
<tbody><tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;height:.2in">
<td width="343" style="width: 257pt; border-width: 1pt; border-color: windowtext; background: rgb(198, 235, 217); padding: 0in 5.4pt; height: 0.2in;">
<div><b><span lang="EN-IN" style="font-size: 10pt; color: black;">REF KEYWORD<o:p></o:p></span></b></div>
</td>
<td width="329" style="width: 247pt; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-top-color: windowtext; border-right-color: windowtext; border-bottom-color: windowtext; border-left: none; background: rgb(198, 235, 217); padding: 0in 5.4pt; height: 0.2in;">
<div><b><span lang="EN-IN" style="font-size: 10pt; color: black;">OUT KEYWORD<o:p></o:p></span></b></div>
</td>
</tr>
<tr style="mso-yfti-irow:1;height:21.55pt">
<td width="343" style="width: 257pt; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-top: none; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; padding: 0in 5.4pt; height: 21.55pt;">
<div><span lang="EN-IN" style="font-size: 10pt; color: black;">Ref should be used when we know the parameter value before calling the
method.<o:p></o:p></span></div>
</td>
<td width="329" style="width: 247pt; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; padding: 0in 5.4pt; height: 21.55pt;">
<div><span lang="EN-IN" style="font-size: 10pt; color: black;">Out should be used when we don't know the parameter value before
calling the methods.<o:p></o:p></span></div>
</td>
</tr>
<tr style="mso-yfti-irow:2;height:17.5pt">
<td width="343" style="width: 257pt; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-top: none; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; padding: 0in 5.4pt; height: 17.5pt;">
<div><span lang="EN-IN" style="font-size: 10pt; color: black;">When ref keyword is used the data may pass in bi-directional.<o:p></o:p></span></div>
</td>
<td width="329" style="width: 247pt; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; padding: 0in 5.4pt; height: 17.5pt;">
<div><span lang="EN-IN" style="font-size: 10pt; color: black;">When out keyword is used the data only passed in unidirectional.<o:p></o:p></span></div>
</td>
</tr>
<tr style="mso-yfti-irow:3;height:18.85pt">
<td width="343" style="width: 257pt; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-top: none; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; padding: 0in 5.4pt; height: 18.85pt;">
<div><span lang="EN-IN" style="font-size: 10pt; color: black;">It is necessary the <b>parameters
should initialize before it pass to ref.</b><o:p></o:p></span></div>
</td>
<td width="329" style="width: 247pt; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; padding: 0in 5.4pt; height: 18.85pt;">
<div><span lang="EN-IN" style="font-size: 10pt; color: black;">It is not necessary to initialize parameters before it pass to out.<o:p></o:p></span></div>
</td>
</tr>
<tr style="mso-yfti-irow:4;mso-yfti-lastrow:yes;height:.5in">
<td width="343" style="width: 257pt; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-top: none; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; padding: 0in 5.4pt; height: 0.5in;">
<div><span lang="EN-IN" style="font-size: 10pt; color: black;">The passing of value through ref parameter is useful when the called <a name="_GoBack"></a>method also need to change the value of passed parameter.<o:p></o:p></span></div>
</td>
<td width="329" style="width: 247pt; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; padding: 0in 5.4pt; height: 0.5in;">
<div><span lang="EN-IN" style="font-size: 10pt; color: black;">The declaring of parameter through out parameter is useful when a
method return multiple values.<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<h4><br></h4><h4>
11. INDEXERS:<b style="font-size: 10pt; font-family: Arial, "sans-serif";">An indexer</b><span style="color: rgb(34, 34, 34); font-size: 10pt; font-family: Arial, "sans-serif";"> allows an
object to be indexed such as an array. When you </span><b style="font-size: 10pt; font-family: Arial, "sans-serif";">define</b><span style="color: rgb(34, 34, 34); font-size: 10pt; font-family: Arial, "sans-serif";"> an </span><b style="font-size: 10pt; font-family: Arial, "sans-serif";">indexer</b><span style="color: rgb(34, 34, 34); font-size: 10pt; font-family: Arial, "sans-serif";"> for
a class, this class behaves similar to a virtual array. You can then access the
instance of this class using the array access operator ([]).</span></h4>
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">Indexers is a property so we
need to define get and set for the same.<o:p></o:p></span></div>
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">Defined by using “this”
keyword.<o:p></o:p></span></div>
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">Help us to simplify the way
we access the collection from a class.<o:p></o:p></span></div>
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">Indexer cannot be static.<o:p></o:p></span></div><div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;"><br></span></div><div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;"><br></span></div>
<h4>12. Delegates: <b style="font-family: Arial, "sans-serif"; font-size: 12pt;"><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;"> </span></b></h4>
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">A delegate is a type-safe
function pointer. <o:p></o:p></span></div>
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">A delegate points a
function, and when you evoke this delegate, the function will be invoked.<o:p></o:p></span></div>
<div style="font-size: 12pt; font-family: Arial, "sans-serif";"><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">Signature of delegate must
match with the signature of function.<o:p></o:p></span></div>
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;">Delegate syntax look very
much similar to a method with a delegate keyword.<o:p></o:p></span></div>
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><span lang="EN-IN" style="font-size: 10pt; color: blue;">
publicdelegatevoid</span><span lang="EN-IN" style="font-size: 10pt;">Delegate1<span style="color:black">(</span><span style="color:blue">string</span><span style="color:black"> message);<o:p></o:p></span></span></div>
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><span lang="EN-IN" style="font-size: 10pt; color: blue;">
publicclass DelegateDemo</span><span lang="EN-IN" style="font-size: 10pt; color: black;"><o:p></o:p></span></div>
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><span lang="EN-IN" style="font-size: 10pt; color: black;"> {<o:p></o:p></span></div>
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><span lang="EN-IN" style="font-size: 10pt; color: blue;">
publicstaticvoid</span><span lang="EN-IN" style="font-size: 10pt; color: black;">Method(</span><span lang="EN-IN" style="font-size: 10pt; color: blue;">string</span><span lang="EN-IN" style="font-size: 10pt; color: black;">
message) { </span><span lang="EN-IN" style="font-size: 10pt; color: rgb(43, 145, 175);">Console</span><span lang="EN-IN" style="font-size: 10pt; color: black;">.WriteLine(message); }<o:p></o:p></span></div>
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><span lang="EN-IN" style="font-size: 10pt; color: blue;">
publicvoid</span><span lang="EN-IN" style="font-size: 10pt; color: black;">main() {
</span><span lang="EN-IN" style="font-size: 10pt; color: rgb(43, 145, 175);">Daliage1</span><span lang="EN-IN" style="font-size: 10pt; color: black;"> d1 = </span><span lang="EN-IN" style="font-size: 10pt; color: blue;">new</span><span lang="EN-IN" style="font-size: 10pt; color: rgb(43, 145, 175);">Daliage1</span><span lang="EN-IN" style="font-size: 10pt; color: black;">(Method);
d1(</span><span lang="EN-IN" style="font-size: 10pt; color: rgb(163, 21, 21);">"Hello"</span><span lang="EN-IN" style="font-size: 10pt; color: black;">); }</span><span lang="EN-IN" style="font-size: 10pt;"><o:p></o:p></span></div>
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><span lang="EN-IN" style="font-size: 10pt; color: black;"> }</span><span lang="EN-IN" style="font-size: 10pt;"><o:p></o:p></span></div>
<div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><span lang="EN-IN" style="font-size: 10pt; line-height: 107%;"><o:p> </o:p></span></div><h4>
13. Multicast delegate:</h4><div style="font-family: Arial, "sans-serif"; font-size: 12pt;"><b style="font-family: Calibri, Verdana, Helvetica, sans-serif; font-size: 15px;"><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif""></span></b></div></span></span>
<div><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana"><span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";"> </span></span><o:wrapblock><b><span lang="EN-IN" style="font-size:9.0pt;
line-height:107%;font-family:"Arial","sans-serif"">Event is a REFERENCE to a
delegate with two restrictions </span></b><div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:9.0pt;line-height:107%;font-family:"Courier New";
mso-fareast-font-family:"Courier New";mso-bidi-font-weight:bold"> o<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:9.0pt;
line-height:107%;font-family:"Arial","sans-serif"">Cannot be invoked directly<o:p></o:p></span></div><div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:9.0pt;line-height:107%;font-family:"Courier New";
mso-fareast-font-family:"Courier New";mso-bidi-font-weight:bold"> o<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:9.0pt;
line-height:107%;font-family:"Arial","sans-serif"">Cannot be assigned values
directly <o:p></o:p></span></div><div><span lang="EN-IN" style="font-size:9.0pt;
line-height:107%;font-family:"Arial","sans-serif""><span lang="EN-IN" style="font-size: 9pt; line-height: 107%;"><span style="font-family: "Courier New";">o </span>Above two are the weak points for delegates and
it is addressed in event</span><br></span></div><div> </div><h4>
14. Events
</h4><div><div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif"">A mechanism for
communication between objects.<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif"">Used to build the loosely
coupled application.<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif"">Help extending applications.<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><b><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif"">Events are the higher level of
encapsulation over delegates. Events use delegates internally. <o:p></o:p></span></b></div><div><b><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif""><br></span></b></div><div><b><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif""><br></span></b></div>
<h4>15. Dispose of / Garbage collector, Destructor & Finalize</h4><div><b><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif""><o:p></o:p></span></b></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana;color:black">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><b><span lang="EN-IN" style="font-size: 10pt; line-height: 107%; font-family: Arial, "sans-serif"; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">Dispose()</span></b><span lang="EN-IN" style="font-size: 10pt; line-height: 107%; font-family: Arial, "sans-serif"; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;"> is used to free unmanaged resources like files,
database connections etc.<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana;color:black">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 10pt; line-height: 107%; font-family: Arial, "sans-serif"; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">It’s
called by user code explicitly and classmust have the<b>IDisposable</b>interfaceimplement.<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana;color:black">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 10pt; line-height: 107%; font-family: Arial, "sans-serif"; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">.Net
also offers <b>Finalize</b>
method to clean up unmanaged resources held by an object before that object is
destroyed.<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana;color:black">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 10pt; line-height: 107%; font-family: Arial, "sans-serif"; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">Unlike
Dispose method, the Finalize method can't
be called by user code but it is called by <b>Garbage Collector</b>.<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana;color:black">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 10pt; line-height: 107%; font-family: Arial, "sans-serif"; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">No
performance costwith Dispose method.<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana;color:black">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 10pt; line-height: 107%; font-family: Arial, "sans-serif"; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">Finalize
has performance issue as it doesn't clean up memory immediately and is called
by GC automatically.<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana;color:black">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><b><span lang="EN-IN" style="font-size: 10pt; line-height: 107%; font-family: Arial, "sans-serif"; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">NOTE:</span></b><span lang="EN-IN" style="font-size: 10pt; line-height: 107%; font-family: Arial, "sans-serif"; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">It is always recommended not to implement a
Finalize method for managed objects as GC cleans up managed resources
automatically.<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><b><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif"">Destructor:</span></b><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif"">
Clean unmanaged object.<o:p></o:p></span></div>
<h4>
16. How Can you force Garbage collector to run?</h4><div><b><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif""></span></b><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif""><o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;mso-bidi-font-weight:
bold">ð<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><b><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif"">SystemGC.Collect();<o:p></o:p></span></b></div><div><b><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif""><br></span></b></div><div><b><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif""><br></span></b></div>
<h4>17. Object Cloning / Copy Object | Shallow Copy vs Deep Copy.</h4><div><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;
font-family:"Arial","sans-serif""><o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif""> -- Cloning
is a process of creating a new object from an existing object.<o:p></o:p></span></div>
<div><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif""> 2
Technique<o:p></o:p></span></div><div><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif""><br></span></div>
<h4>=> Shallow Copy:
</h4><div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings">§<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";"> </span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif"">Create
new object and copy only value type properties and variables into new copy and
pass the same references of reference types to new object. <o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings">§<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";"> </span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif"">i.e.
updates for 1 object also reflect on other <o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings">§<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";"> </span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif"">Achieve
by object method</span><span lang="EN-IN" style="font-size:10.0pt;line-height:
107%;font-family:"Arial","sans-serif";mso-fareast-font-family:NSimSun">this.MemberwiseClone();</span><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif""><o:p></o:p></span></div>
<h4>=> Deep Copy<b style="font-family: Calibri, Verdana, Helvetica, sans-serif; font-size: 15px;"><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif"">:</span></b><span lang="EN-IN" style="font-size: 10pt; line-height: 107%; font-family: Arial, "sans-serif";"> Along with value type, Deep copy creates new
objects for each reference type also.</span></h4>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings">§<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";"> </span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif"">i.e.
updates for 1 object dint effect the other.<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Courier New";
mso-fareast-font-family:"Courier New"">o<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";"> </span></span><!--[endif]--><b><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif"">C# Attribute<o:p></o:p></span></b></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings">§<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";"> </span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif"">Used
to add declarative information to the programs. This information can then be
queried at runtime using reflection<b>.<o:p></o:p></b></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings">§<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";"> </span></span><!--[endif]--><b><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif"">Predefined attributes<o:p></o:p></span></b></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol">·<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><b><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif"">Obsolete<o:p></o:p></span></b></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol">·<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><b><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif"">WebMethod<o:p></o:p></span></b></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol">·<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><b><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif"">Serilizable<o:p></o:p></span></b></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings">§<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";"> </span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif"">ObsoleteAttribute
inherited from Attribute class.<o:p></o:p></span></div></div></o:wrapblock></div></div>
Q: Define SOLID Principle
Ans: SOLID: is an ACRONYM (Short form) of 5 Design Principles, Promoted by Robert C Martin.
S: Single Responsibility Principle (SRP): A class should have only one reason to change O: Open closed Principle (OSP): Open for extension, but closed for modification. L: Liskov substitution Principle (LSP): Reference to base class replaced by derived class. It extends the Open/Closed principle. I: Interface Segregation Principle (ISP): Break big interface into small client-specific interfaces. D: Dependency Inversion Principle (DIP): High-level modules should not depend on low level.
<div><h4><u><br></u></h4><h4><u>1. Single Responsibility Principle</u></h4><b><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Arial","sans-serif""><o:p></o:p></span></b></div>
<div><span style="font-family: Arial, "sans-serif"; font-size: 10pt;">Every
module or class should have responsibility over a single part of the
functionality provided by the software, and that responsibility should be
entirely encapsulated by the class.</span><br></div>
<h4><br></h4><h4><u>
2. Open/Closed Principle</u></h4><div><b><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif""><u><o:p></o:p></u></span></b></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif";mso-bidi-font-weight:bold">“Software
entities should be open for extension, but closed for modification”</span><b><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif""><o:p></o:p></span></b></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif";mso-bidi-font-weight:bold">The
design and writing of the code should be done in a way that new functionality
should be added with minimum changes in the existing code.<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif";mso-bidi-font-weight:bold">The
design should be done in a way to allow the adding of new functionality as new
classes, keeping as much as possible existing code unchanged.<o:p></o:p></span></div>
<h4><u><br></u></h4><h4><u>
3. Liskov Substitution Principle</u></h4><div><b><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif""><u></u><o:p></o:p></span></b></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif";mso-bidi-font-weight:bold">Introduced
by Barbara Liskov state that “objects in a program should be replaceable with
instances of their sub-types without altering the correctness of that
program” <o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif";mso-bidi-font-weight:bold">If
a program module is using a Base class, then the reference to the Base class
can be replaced with a Derived class without affecting the functionality of the
program module<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif";mso-bidi-font-weight:bold">We
can also state that Derived types must be substitutable for their base types.<o:p></o:p></span></div>
<h4><br></h4><h4><u>
4. Interface Segregation Principle
</u></h4><div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif";mso-bidi-font-weight:bold">“<a name="_Hlk43453579">Many client-specific interfaces are better than one
general-purpose interface</a>”<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif";mso-bidi-font-weight:bold">We
should not enforce clients to implement interfaces that they don't use.<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif";mso-bidi-font-weight:bold">Instead
of creating one big interface we can break down it to smaller interfaces<o:p></o:p></span></div>
<h4><u><br></u></h4><h4><u>
5. Dependency Inversion Principle</u></h4><div><b><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif""><u><o:p></o:p></u></span></b></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif";mso-bidi-font-weight:bold">One
should “depend upon abstractions, [not] concretions"<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif";mso-bidi-font-weight:bold">Abstractions
should not depend on the details whereas the details should depend on
abstractions.<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;line-height:107%;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
line-height:107%;font-family:"Arial","sans-serif";mso-bidi-font-weight:bold">High-level
modules should not depend on low-level modules.<o:p></o:p></span></div>
Q: Types of classes in C# and in .Net Framework
<div><!--[if !supportLists]--><b><span style="font-size:16.0pt;mso-bidi-font-size:10.0pt;font-family:
"Arial","sans-serif";mso-fareast-font-family:Arial;color:#333333">1.<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";"> </span></span></b><!--[endif]--><b><u><span style="font-size:16.0pt;
mso-bidi-font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-font-family:
"Times New Roman";color:#333333">Sealed Class<o:p></o:p></span></u></b></div>
<div><!--[if !supportLists]--><span style="font-size: 16pt; font-family: Symbol;">·<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 16pt; font-family: Arial, "sans-serif";">Stop a class from
further inheriting.</span><span style="font-size: 16pt;"><o:p></o:p></span></div>
<div><!--[if !supportLists]--><span style="font-size: 16pt; font-family: Symbol;">·<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 16pt; font-family: Arial, "sans-serif";">Can’t be a base class.</span><span style="font-size: 16pt;"><o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size: 16pt; font-family: Symbol;">·<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 16pt; font-family: Arial, "sans-serif";">Can’t be abstract.<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span style="font-size: 16pt; font-family: Symbol;">·<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size: 16pt; font-family: Arial, "sans-serif";">Never be a parent, but
maybe a child.</span><span style="font-size: 16pt;"><o:p></o:p></span></div>
<div><span style="font-size: 16pt;"> </span></div>
<div><!--[if !supportLists]--><b><span style="font-size:16.0pt;mso-bidi-font-size:
10.0pt;font-family:"Arial","sans-serif";mso-fareast-font-family:Arial;
color:#333333">2.<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span></b><!--[endif]--><b><u><span style="font-size:16.0pt;mso-bidi-font-size:10.0pt;font-family:"Arial","sans-serif";
mso-fareast-font-family:"Times New Roman";color:#333333">Partial Class</span></u></b><b><span style="font-size:16.0pt;mso-bidi-font-size:
10.0pt;font-family:"Arial","sans-serif";mso-fareast-font-family:"Times New Roman";
color:#333333">: </span></b><span style="font-size: 16pt; font-family: Arial, "sans-serif";">It is possible to split the definition of a class, a struct, an
interface or a method over two or more source files. Each source file contains
a section of the type or method definition, and all parts are combined when the
application is compiled.</span></div><div><span style="font-size: 16pt; font-family: Arial, "sans-serif";"><br></span></div>
<div><!--[if !supportLists]--><b><span style="font-size:18.0pt;mso-bidi-font-size:
11.0pt;line-height:115%;mso-bidi-font-family:Calibri;mso-bidi-theme-font:minor-latin">3.<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span></b><!--[endif]--><b><u><span style="font-size:18.0pt;mso-bidi-font-size:11.0pt;line-height:115%">Static
Class:</span></u></b><span style="font-size:18.0pt;mso-bidi-font-size:11.0pt;
line-height:115%"> </span><span style="font-size:16.0pt;mso-bidi-font-size:
10.0pt;line-height:115%;font-family:"Arial","sans-serif"">Static class cannot
be instantiated. In other words, you cannot use the new operator to create a
variable of the class type. Because there is no instance variable, you access
the members of a static class by using the class name</span><b><u><span style="font-size:18.0pt;
mso-bidi-font-size:11.0pt;line-height:115%"><o:p></o:p></span></u></b></div>
<div><b><span style="font-size:16.0pt;mso-bidi-font-size:
10.0pt;line-height:115%;font-family:"Arial","sans-serif";mso-fareast-font-family:
Arial"><br></span></b></div><div><!--[if !supportLists]--><b><span style="font-size:16.0pt;mso-bidi-font-size:
10.0pt;line-height:115%;font-family:"Arial","sans-serif";mso-fareast-font-family:
Arial">4.<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span></b><!--[endif]--><b><u><span style="font-size:18.0pt;mso-bidi-font-size:11.0pt;line-height:115%">Poco Classes:
(</span></u></b><span style="font-size:16.0pt;mso-bidi-font-size:10.0pt;
line-height:115%;font-family:"Arial","sans-serif"">Plain Old CLR Objects</span><b><u><span style="font-size:18.0pt;
mso-bidi-font-size:11.0pt;line-height:115%">)</span></u></b><span style="font-size:16.0pt;mso-bidi-font-size:10.0pt;line-height:115%;font-family:
"Arial","sans-serif""><o:p></o:p></span></div>
<div><!--[if !supportLists]--><span style="font-size:16.0pt;mso-bidi-font-size:10.0pt;line-height:115%;font-family:
Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol">·<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span style="font-size:16.0pt;mso-bidi-font-size:
10.0pt;line-height:115%;font-family:"Arial","sans-serif"">POCO entity is a
class that doesn't depend on any framework-specific base class.<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span style="font-size:16.0pt;mso-bidi-font-size:10.0pt;line-height:115%;font-family:
Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol">·<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span style="font-size:16.0pt;mso-bidi-font-size:
10.0pt;line-height:115%;font-family:"Arial","sans-serif"">It is like any other
normal .NET CLR class, which is why it is called "Plain Old CLR
Objects".<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span style="font-size:16.0pt;mso-bidi-font-size:10.0pt;line-height:115%;font-family:
Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol">·<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span style="font-size:16.0pt;mso-bidi-font-size:
10.0pt;line-height:115%;font-family:"Arial","sans-serif"">POCO entities are
supported in both EF 6 and EF Core.<o:p></o:p></span></div>
Q: Asynchronous programming with async, await, Task in C#
- async, await, and Task
Ans: C# and .NET Framework (4.5 & Core) supports asynchronous programming.
Microsoft recommends Task-based Asynchronous Pattern to implement asynchronous programming in the .NET Framework or .NET Core applications using async , await keywords and Task or Task<TResult> class.
<div><span style="font-size:18px;"><u>async: </u></span>Method that performs asynchronous tasks such as fetching data from a database, reading a file, etc, they can be marked as “async”.</div><span style="font-size:18px;"><u>
await</u>: </span><span style="font-family: Arial, "sans-serif"; font-size: 10pt;">wait for a response without blocking resources.</span><br><table class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0" style="margin-left: 126.9pt; border: none;">
<tbody><tr>
<td width="139" valign="top" style="width: 104.15pt; border-width: 1pt; border-color: windowtext; padding: 0in 5.4pt;">
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif"">Task<o:p></o:p></span></div>
</td>
<td width="179" valign="top" style="width: 134.35pt; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-top-color: windowtext; border-right-color: windowtext; border-bottom-color: windowtext; border-left: none; padding: 0in 5.4pt;">
<div><span lang="EN-IN" style="font-size:10.0pt;font-family:"Arial","sans-serif"">Thread<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td width="139" valign="top" style="width: 104.15pt; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-top: none; padding: 0in 5.4pt;">
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
font-family:"Arial","sans-serif"">Task is a single unit of work.<o:p></o:p></span></div>
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
font-family:"Arial","sans-serif"">A small block of code<o:p></o:p></span></div>
</td>
<td width="179" valign="top" style="width: 134.35pt; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; padding: 0in 5.4pt;">
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
font-family:"Arial","sans-serif"">Thread is a basic unit of UPU utilization.<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td width="139" valign="top" style="width: 104.15pt; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-top: none; padding: 0in 5.4pt;">
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
font-family:"Arial","sans-serif"">Task is something to be done.<o:p></o:p></span></div>
</td>
<td width="179" valign="top" style="width: 134.35pt; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; padding: 0in 5.4pt;">
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
font-family:"Arial","sans-serif"">Thread are responsible for doing tasks<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td width="139" valign="top" style="width: 104.15pt; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-top: none; padding: 0in 5.4pt;">
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
font-family:"Arial","sans-serif""> </span></div>
</td>
<td width="179" valign="top" style="width: 134.35pt; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; padding: 0in 5.4pt;">
<div><!--[if !supportLists]--><span lang="EN-IN" style="font-size:10.0pt;font-family:"Verdana","sans-serif";
mso-fareast-font-family:Verdana;mso-bidi-font-family:Verdana">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">
</span></span><!--[endif]--><span lang="EN-IN" style="font-size:10.0pt;
font-family:"Arial","sans-serif""> </span></div>
</td>
</tr>
</tbody></table>