<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-837547499221405973</id><updated>2024-10-06T20:25:37.457-07:00</updated><title type='text'>Dot Net Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://shashikantgiri.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/837547499221405973/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://shashikantgiri.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Shashikant Giri</name><uri>http://www.blogger.com/profile/08319700562876816907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-837547499221405973.post-4397558539591828215</id><published>2012-05-18T04:55:00.001-07:00</published><updated>2012-05-18T05:08:36.420-07:00</updated><title type='text'>Object Oriented Programming in VB.Net (Cont.)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; font-family: verdana; font-size: x-small; text-align: justify;&quot;&gt;
&lt;strong&gt;Polymorphism&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: verdana; font-size: x-small; text-align: justify;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; text-align: justify;&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: transparent; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: verdana; font-size: xx-small;&quot;&gt;Polymorphism&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana; font-size: xx-small;&quot;&gt;&amp;nbsp;basically stands for &quot; one name , multiple behaviour&quot; in general concept. It is a&amp;nbsp;important&amp;nbsp;feature of OOPS , In programming it is also called overloading, overloading means the use of same thing for different purposes.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: verdana; font-size: xx-small;&quot;&gt;By using of this polymorphism feature we can create many function with the same name, and that all function will show different&amp;nbsp;behavior&amp;nbsp;in&amp;nbsp;different&amp;nbsp;scenarios, but with different argument list.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: verdana; font-size: xx-small;&quot;&gt;and the function will perform different operations based on argument list &amp;nbsp;in function call.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: verdana; font-size: x-small; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: verdana; font-size: x-small; text-align: justify;&quot;&gt;
The following code demonstrates the implementation of Polymorphism.&lt;/div&gt;
&lt;div style=&quot;background-color: white; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;Module Module1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; Sub Main()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim two As New One()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(two.addition(5))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(two.addition(5, 10))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(two.addition(5, 10, 20))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.Read()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; End Sub&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;End Module&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;Public Class One&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; Public x, y, z As Integer&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; Public Function addition(ByVal x As Integer) As Integer&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;function with one argument&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Return x&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; End Function&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; Public Function addition(ByVal x As Integer, ByVal y As Integer) As Integer&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;function with two arguments&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Return x + y&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; End Function&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; Public Function addition(ByVal x As Integer, ByVal y As Integer, ByVal z As Integer) As Integer&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;function with three arguments&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Return x + y + z&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&amp;nbsp; &amp;nbsp; End Function&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;End Class&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: verdana;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: verdana; font-size: x-small; text-align: justify;&quot;&gt;
Output of the above code is shown in the image below.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcLyl0ecDiVHaMo6IqWPMVA1jMhywqF6UB_XH4v9SsPCDSZSv6NQwpmWm0aN0M5dSGo55YQ1skbJsq_PBdH66w165RfYwkSt7GIEiXQjwbiab2pWzHCvI9Qr0x_TKLQ6TQI73Kwp18gTzz/s1600/Polymorphism_Console.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;157&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcLyl0ecDiVHaMo6IqWPMVA1jMhywqF6UB_XH4v9SsPCDSZSv6NQwpmWm0aN0M5dSGo55YQ1skbJsq_PBdH66w165RfYwkSt7GIEiXQjwbiab2pWzHCvI9Qr0x_TKLQ6TQI73Kwp18gTzz/s320/Polymorphism_Console.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shashikantgiri.blogspot.com/feeds/4397558539591828215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashikantgiri.blogspot.com/2012/05/object-oriented-programming-in-vbnet_18.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/837547499221405973/posts/default/4397558539591828215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/837547499221405973/posts/default/4397558539591828215'/><link rel='alternate' type='text/html' href='http://shashikantgiri.blogspot.com/2012/05/object-oriented-programming-in-vbnet_18.html' title='Object Oriented Programming in VB.Net (Cont.)'/><author><name>Shashikant Giri</name><uri>http://www.blogger.com/profile/08319700562876816907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcLyl0ecDiVHaMo6IqWPMVA1jMhywqF6UB_XH4v9SsPCDSZSv6NQwpmWm0aN0M5dSGo55YQ1skbJsq_PBdH66w165RfYwkSt7GIEiXQjwbiab2pWzHCvI9Qr0x_TKLQ6TQI73Kwp18gTzz/s72-c/Polymorphism_Console.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-837547499221405973.post-5349546640241300986</id><published>2012-05-17T03:32:00.001-07:00</published><updated>2012-05-17T23:34:10.537-07:00</updated><title type='text'>Object Oriented Programming in VB.Net..</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hello! this is my first post in my blog, As this blog is for VB.Net I am going to start with OOP in &amp;nbsp;VB.Net.&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;








&lt;span style=&quot;font-weight: normal;&quot;&gt;What is OOP :&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Basically OOP stands for object oriented programming , it is a programming paradigm focussing on &amp;nbsp; &amp;nbsp; &quot;Objects&quot;. An &quot;Object&quot; is a&lt;span style=&quot;color: #3d85c6;&quot;&gt; &lt;a href=&quot;http://en.wikipedia.org/wiki/Data_structure&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;DataStucture&lt;/a&gt;&lt;/span&gt;- that consist of &amp;nbsp;Data Fields and Methods&amp;nbsp;&lt;span style=&quot;background-color: white; font-family: sans-serif; font-size: 13px; line-height: 19px; text-align: -webkit-auto;&quot;&gt;together with their interactions – to design applications and computer programs.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: sans-serif; font-size: x-small; line-height: 19px; text-align: -webkit-auto;&quot;&gt;The Objects referred 
          to are created from something called a Class.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;OOP is basically stands for Object Oriented Programming, the main features of Object Oriented Programming is , - Encapsulation , Abstraction , Polymorphism and Interface , - The feature Interface differ the Object Oriented with Object base.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;Lets attention a little on Object Based Language too , The object based language is called object based because of its supports only three feature - &amp;nbsp;Data Encapsulation , Data Abstraction and Polymorphism.but not Interface..&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;







&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;b&gt;Concept of Object Oriented Programming:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: sans-serif; font-size: x-small; line-height: 19px;&quot;&gt;Classes&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: sans-serif; font-size: x-small; line-height: 19px;&quot;&gt;Objects&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;Data Abstraction and Encapsulation&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;Inheritence&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;Plymorphism&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;



&lt;strong style=&quot;background-color: white; font-family: verdana; font-size: x-small; text-align: justify;&quot;&gt;Objects&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: verdana; font-size: xx-small; font-weight: normal; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot; /&gt;&lt;i style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot;&gt;Objects&amp;nbsp;&lt;/i&gt;&lt;span style=&quot;background-color: white; font-family: verdana; font-size: xx-small; font-weight: normal; text-align: justify;&quot;&gt;are the basic run-time entities in an object-oriented system. Programming problem is analyzed in terms of objects and nature of communication between them. When a program is executed, objects interact with each other by sending messages.&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana; font-size: xx-small; font-weight: normal; text-align: justify;&quot;&gt;&amp;nbsp;Different objects can also interact with each other without knowing the details of&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana; font-size: xx-small; font-weight: normal; text-align: justify;&quot;&gt;&amp;nbsp;their data or code.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot; /&gt;&lt;strong style=&quot;background-color: white; font-family: verdana; font-size: x-small; text-align: justify;&quot;&gt;Classes&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: verdana; font-size: xx-small; font-weight: normal; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: verdana; font-size: xx-small; font-weight: normal; text-align: justify;&quot;&gt;A&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot;&gt;class&lt;/i&gt;&lt;span style=&quot;background-color: white; font-family: verdana; font-size: xx-small; font-weight: normal; text-align: justify;&quot;&gt;&amp;nbsp;is a collection of objects of similar type. Once a class is defined, any number of objects can be created which belong to&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana; font-size: xx-small; font-weight: normal; text-align: justify;&quot;&gt;that class.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot; /&gt;&lt;strong style=&quot;background-color: white; font-family: verdana; font-size: x-small; text-align: justify;&quot;&gt;Data&amp;nbsp;Abstraction&amp;nbsp;and Encapsulation&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: verdana; font-size: xx-small; font-weight: normal; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot; /&gt;&lt;i style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot;&gt;Abstraction&lt;/i&gt;&lt;span style=&quot;background-color: white; font-family: verdana; font-size: xx-small; font-weight: normal; text-align: justify;&quot;&gt;&amp;nbsp;refers to the act of representing essential features without including the background details or&amp;nbsp;explanations. Classes use the concept of abstraction and are defined as a list of abstract attributes.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: verdana; font-size: xx-small; font-weight: normal; text-align: justify;&quot;&gt;Storing data and functions in a single unit (class) is&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot;&gt;encapsulation.&lt;/i&gt;&lt;span style=&quot;background-color: white; font-family: verdana; font-size: xx-small; font-weight: normal; text-align: justify;&quot;&gt;&amp;nbsp;Data cannot be accessible to the outside world&amp;nbsp;and only those functions which are stored in the class can access it.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot; /&gt;&lt;strong style=&quot;background-color: white; font-family: verdana; font-size: x-small; text-align: justify;&quot;&gt;Inheritance&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: verdana; font-size: xx-small; font-weight: normal; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot; /&gt;&lt;i style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot;&gt;Inheritance&lt;/i&gt;&lt;span style=&quot;background-color: white; font-family: verdana; font-size: xx-small; font-weight: normal; text-align: justify;&quot;&gt;&amp;nbsp;is the process by which objects can acquire the properties of objects of other class. In OOP,&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot;&gt;inheritance&lt;/i&gt;&lt;span style=&quot;background-color: white; font-family: verdana; font-size: xx-small; font-weight: normal; text-align: justify;&quot;&gt;&amp;nbsp;provides reusability, like, adding additional features&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana; font-size: xx-small; font-weight: normal; text-align: justify;&quot;&gt;&amp;nbsp;to an existing class without modifying it. This is achieved by deriving a new class from the existing one. The new class will have combined features of both the classes.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot; /&gt;&lt;strong style=&quot;background-color: white; font-family: verdana; font-size: x-small; text-align: justify;&quot;&gt;Polymorphism&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: verdana; font-size: xx-small; font-weight: normal; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot; /&gt;&lt;i style=&quot;background-color: white; font-family: verdana; font-size: x-small; font-weight: normal; text-align: justify;&quot;&gt;Polymorphism&lt;/i&gt;&lt;span style=&quot;background-color: white; font-family: verdana; font-size: xx-small; font-weight: normal; text-align: justify;&quot;&gt;&amp;nbsp;means the ability to take more than one form. An operation may exhibit different behaviors in different&amp;nbsp;instances. The behavior depends on the data types used in the operation. Polymorphism is extensively used in implementing Inheritence.&lt;/span&gt;&lt;/h3&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;








&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;Abstract Classes :&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;An abstract classes is the class that is not used to create objects. It is designed to act as a base class that is to be inherited by another class. We can say abstract class is design concept in program development and also provide a base upon which other classes are built. Abstract classes are similar to Interfaces, the abstract classes cannot be instantiated its own.after declaring a abstract class it cannot be instantiated its own. it must be inherited, Like as interfaces abstract classes can specify members that must be implemented in inheriting classes . Abstract Classes can only specify members that should be implemented by all inheriting classes.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;








&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;Creating Abstract Classes :&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;In vb.net an abstract class is created by using &quot;MustInherit&quot; keyword.&amp;nbsp;An abstract class like all other classes can implement any number of members. Members of an abstract class can either be Overridable (all the inheriting classes can create their own implementation of the members) or they can have a fixed implementation that will be common to all inheriting members. Abstract classes can also specify abstract members. Like abstract classes, abstract members also provide no details regarding their implementation. Only the member type, access level, required parameters and return type are specified. To declare an abstract member we use the MustOverride keyword. Abstract members should be declared in abstract classes.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;





&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;Implementing Abstract Class :&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;When a class is inherited by Abstract Class, It must inherit every abstract member defined in abstract class, Implementation is possible by overriding the member specified in the abstract class.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;Following is the code to demonstrate the abstract class,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;Module moduloe1&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;Public MustInherit Class AbstractClass&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;declaring an abstract class with MustInherit keyword&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Public MustOverride Function Add() As Integer&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Public MustOverride Function Mul() As Integer&lt;/span&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;End Class&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Class&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;Public Class A1 inherits A&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim i as integer &amp;nbsp;= 30&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim j as integer &amp;nbsp;= 50&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Public Override Function Add() as Integer&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Return i+j&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Function&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Public Override Function mul() as integer&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return i*j&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Function&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;End Class&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;Sub Main()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dim abs as New A()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;sum is&quot; &amp;amp; &quot;&quot; &amp;amp; abs.add().ToString())&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;Multiplication is&quot; &amp;amp; &quot; &quot; &amp;amp; abs.mul().ToString())&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Console. Read()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;End Sub&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;End Module&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;The Result will be&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1GqnxFQausRPYaXKC-jdlrHexbT7KhyphenhyphenuzJAU9nyntzpOAWKg01OOf0U-TLUF3LFn-OdNP6qjl3MaSLXao3qd32feE3a8qexo4Hz8tlNQMOyTyVdxzXWBHtMgHEn6GzlY5rNjy1_QtSwkC/s1600/concole1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;157&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1GqnxFQausRPYaXKC-jdlrHexbT7KhyphenhyphenuzJAU9nyntzpOAWKg01OOf0U-TLUF3LFn-OdNP6qjl3MaSLXao3qd32feE3a8qexo4Hz8tlNQMOyTyVdxzXWBHtMgHEn6GzlY5rNjy1_QtSwkC/s320/concole1.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 19px;&quot;&gt;
&lt;span style=&quot;font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: sans-serif; font-size: 13px; line-height: 19px; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shashikantgiri.blogspot.com/feeds/5349546640241300986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shashikantgiri.blogspot.com/2012/05/object-oriented-programming-in-vbnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/837547499221405973/posts/default/5349546640241300986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/837547499221405973/posts/default/5349546640241300986'/><link rel='alternate' type='text/html' href='http://shashikantgiri.blogspot.com/2012/05/object-oriented-programming-in-vbnet.html' title='Object Oriented Programming in VB.Net..'/><author><name>Shashikant Giri</name><uri>http://www.blogger.com/profile/08319700562876816907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1GqnxFQausRPYaXKC-jdlrHexbT7KhyphenhyphenuzJAU9nyntzpOAWKg01OOf0U-TLUF3LFn-OdNP6qjl3MaSLXao3qd32feE3a8qexo4Hz8tlNQMOyTyVdxzXWBHtMgHEn6GzlY5rNjy1_QtSwkC/s72-c/concole1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>