<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vikas Ubale on Medium]]></title>
        <description><![CDATA[Stories by Vikas Ubale on Medium]]></description>
        <link>https://medium.com/@ubale.vikas9?source=rss-8ab4b912f082------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*B12uJYL01qT38xYFCq0PxQ.jpeg</url>
            <title>Stories by Vikas Ubale on Medium</title>
            <link>https://medium.com/@ubale.vikas9?source=rss-8ab4b912f082------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 22:17:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ubale.vikas9/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Angular pipe]]></title>
            <link>https://medium.com/@ubale.vikas9/angular-pipe-cd95052b95c6?source=rss-8ab4b912f082------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd95052b95c6</guid>
            <category><![CDATA[angular-pipe-example]]></category>
            <category><![CDATA[angular-pipes-list]]></category>
            <category><![CDATA[angular-pipe]]></category>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Vikas Ubale]]></dc:creator>
            <pubDate>Sat, 29 Aug 2020 04:01:11 GMT</pubDate>
            <atom:updated>2020-09-02T06:43:23.497Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k5zZ9qV0j9hEgj7BGuSI7Q.jpeg" /></figure><p><strong>What is angular pipe?</strong></p><p>In this article we will learn angular pipe. In angular web applications we needs display data in some specific format. In some scenario we got data in one format in components, but we want to display that data in other format on browser. So in this case we can use angular pipes to display with specific format. “<strong><em>Pipe take a data as a input and transform it into desired output”</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*B-z4FK0S8F1-m56GiKgYug.png" /><figcaption><strong>Pipe service architecture in angular</strong></figcaption></figure><p><strong>We will see one example of build-in angular pipe.</strong></p><pre>Syntax : =&gt; <strong>{{input | pipename }}</strong></pre><pre>Example: =&gt;<strong> {{ 200000 | currency:&#39;INR&#39; }}</strong>  </pre><pre>Output : =&gt; <strong>₹200,000.00</strong></pre><p>Angular provide us some <strong>build-in pipes</strong> in angular as given below:</p><ul><li>Currency Pipe</li><li>Date Pipe</li><li>Decimal Pipe</li><li>JSON Pipe</li><li>Lowercase Pipe</li><li>Uppercase Pipe</li><li>Percent Pipe</li><li>Slice Pipe</li><li><a href="https://codecraft.tv/courses/angular/pipes/built-in-pipes/#_asyncpipe">A</a>sync Pipe</li></ul><p><strong>Now we will see how to create custom pipes.</strong><br> In angular applications there have limited build-in pipes, so at some moments we want some other format of data. In this case angular provides us to create custom pipe using <strong>@Pipe</strong> decorators. I have explain below how to create custom pipe in angular with some basic code. Hope already you have known some basics angular structure.</p><p><strong>Example</strong>, Show list into table and calculate total sum of one column values from table without creating extra methods in component. simply calculate with passing array list and get total sum as a output with pipe.</p><ul><li>Create one file as a <strong>list-sum.pipe.ts </strong>In this file create pipe using @Pipe decorator and give name for pipe as ‘listsum’ using name property like <strong>@Pipe({name: ‘listsum’})</strong></li></ul><pre>import { Pipe, PipeTransform } from &#39;@angular/core&#39;;<br>@Pipe({ name: &#39;<strong>listsum</strong>&#39; })<br>export class <strong>ListSumPipe </strong>implements PipeTransform {<br>    transform(inputArray: Array&lt;any&gt;) {<br>          let sum: number = 0;<br>          inputArray.forEach(a =&gt; sum += a.value);<br>          return sum;<br>    }<br>}</pre><ul><li>Import this pipe class into declaration in <strong>app.module.ts</strong> file.</li></ul><pre>import { BrowserModule } from &#39;@angular/platform-browser&#39;;<br>import { NgModule } from &#39;@angular/core&#39;;<br>import { AppRoutingModule } from &#39;./app-routing.module&#39;;<br>import { AppComponent } from &#39;./app.component&#39;;<br><strong>import { ListSumPipe } from &#39;./services/addition.pipe&#39;;</strong><br>@NgModule({<br>      declarations:[ AppComponent,<br>                     <strong>ListSumPipe</strong><br>                   ],<br>      imports:[<br>                 BrowserModule,<br>                 AppRoutingModule,<br>              ],<br>      bootstrap: [AppComponent],<br>})<br>export class AppModule { }</pre><ul><li>In <strong>app.component.ts</strong> declare one list and there values.</li></ul><pre>import { Component } from &#39;@angular/core&#39;;<br>@Component({<br>    selector: &#39;app-root&#39;,<br>    templateUrl: &#39;./app.component.html&#39;,<br>    styleUrls: [&#39;./app.component.css&#39;]<br>})<br>export class AppComponent <br>{<br>  title = &#39;sampleProject&#39;;<br>  <strong>itemArray =[ { id: 1, value: 23 },<br>               { id: 2, value: 30 },<br>               { id: 3, value: 7 },<br>               { id: 4, value: 21 }<br>             ];</strong><br>  constructor() { }<br>}</pre><ul><li>In <strong>app.component.html </strong>bind array list in bind expression and pass pipe name with <strong>|</strong> pipe operator. Here itemArray displayed in html tables and we want to shown total sum of values from table Value column. So here we passes itemArray as a input with listsum pipe in binding expression like, <strong>{{itemArray | listsum}} </strong>listsum is a pipe name which we have created in pipe class.</li></ul><pre>&lt;div style=&quot;width: 60%;margin: auto; background: aliceblue;&quot;&gt;<br>    &lt;h1&gt; Angular Pipes&lt;/h1&gt;<br>    &lt;hr&gt;<br>&lt;/div&gt;<br>&lt;div style=&quot;width: 60%;margin: auto; background: aliceblue;&quot;&gt;<br>    &lt;label&gt; &lt;b&gt; List : &lt;/b&gt; &lt;/label&gt;<br>    &lt;table border=&quot;1&quot;&gt;<br>      &lt;tr&gt;<br>         &lt;th&gt;Id&lt;/th&gt;<br>         &lt;th&gt;Value&lt;/th&gt;<br>      &lt;/tr&gt;<br>      &lt;tr *ngFor=&quot;let d of itemArray&quot;&gt;<br>         &lt;td&gt; {{d.id}} &lt;/td&gt;<br>         &lt;td&gt; {{d.value}} &lt;/td&gt;<br>      &lt;/tr&gt;<br>      &lt;tr&gt;<br>         &lt;td&gt;&lt;b&gt;Total :&lt;/b&gt;&lt;/td&gt;<br>         &lt;td&gt; &lt;b&gt; <strong>{{ itemArray | listsum}}</strong> &lt;/b&gt; &lt;/td&gt;<br>      &lt;/tr&gt;<br>    &lt;/table&gt;<br>&lt;/div&gt;</pre><ul><li>Now test this with <strong>ng-serve </strong>then you will see the output in browser. you can see total sum of values from tables.</li></ul><p><strong>Output :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yV6GGdWeMi5GTdd5KA6Plw.png" /></figure><h3><strong>Conclusion</strong></h3><p>In this article we have understood what is angular pipes, build-in pipes and custom pipes. And also we understood where we can be use this pipes.</p><p>If you want to prepare angular for an interview, refer below video for better angular interview preparation.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F-jeoyDJDsSM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D-jeoyDJDsSM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F-jeoyDJDsSM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3691b6a0edfa16f889e20e9dfba64836/href">https://medium.com/media/3691b6a0edfa16f889e20e9dfba64836/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd95052b95c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[@Input, and @Output Decorator in Angular]]></title>
            <link>https://medium.com/@ubale.vikas9/input-and-output-decorator-in-angular-337329bc7ac2?source=rss-8ab4b912f082------2</link>
            <guid isPermaLink="false">https://medium.com/p/337329bc7ac2</guid>
            <category><![CDATA[angular-decorator]]></category>
            <category><![CDATA[input-output-decorator]]></category>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Vikas Ubale]]></dc:creator>
            <pubDate>Mon, 27 Apr 2020 16:53:29 GMT</pubDate>
            <atom:updated>2020-04-27T17:29:44.309Z</atom:updated>
            <content:encoded><![CDATA[<p>We all known angular is binding framework. at some scenario we need to pass data from one to another component. The scenario like parent and child, so we can pass data from parent to child as well as child to parent using <strong>@Input</strong>,<strong> @Output </strong>decorators. Also, we can show multiple components in single component using these decorators. Let’s see with one example for better understanding.</p><ul><li>I have created two different components such a name as Parent Component, and Child Component. You can give a name whatever you want for your components.</li><li>In that I have given selector name in @Component decorator, so using that selector name we can use this component anywhere in our applications.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*dA0EiuQxx4W6zzdv-IA93Q.png" /></figure><ul><li>Here I have put two different selectors name in main app html page. So, by using this way we can display multiple components in single component, either you can use different scenario like putting one selector inside of another selector.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*fxJNM52JnIN_9TMYwmdyxg.png" /></figure><p>Now let’s see what’s the use of @Input, @Output in this selector, and how we can implement.</p><p><strong>@Input: This decorator is taken role of pass data from parent to child component</strong><em>. </em>Let’s see how we can implement this,</p><ul><li>First, we need to put selector as a tag in parent html. Here I have assigned <strong>‘InputMessage’ </strong>for the <strong>[receive-parent-input]</strong> in child-app tag. So, this is used for Input variables.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*g_AkQqVe_jIhfmot6dq-pA.png" /></figure><ul><li>Next, inside of parent component class declared one string variable which we need to pass as an input through the Input attributes. And after that I have assigned some message to that string by hit on the sendData() method. You can pass any data type as an input, here I have passed string for better understanding.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*79wF1zF8xl-weNOHEI2U2g.png" /></figure><ul><li>Now, in child component declare @Input decorator with passing input parameter which we have used in parent html as an input attribute, then declare one variable below the @Input. So, when we pass data from the parent component by this ‘receive-parent-input’ then it will assign to below variable which we have declared and bind this variable in view.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*S8R2Db6sqPb6VLNiwAH56Q.png" /></figure><p>In above output window we can see when clicked on ‘send to child’ button message will be displayed on the child view. These all happened by using @Input decorator. Data will pass from parent to child component.</p><p><strong>@Output: This decorator is taken role of pass data from child to parent component.</strong><em> </em>Let’s see how we can implement this,</p><ul><li>First, we already put selector name as tag in parent html. So, in some scenario we need get data back to our parent component from child component. For that, I have assigned one method I.e.</li></ul><p><strong>ReceiveData(): </strong>This is method declared in parent component. We can give name whatever we want for method.</p><p><strong>(callback-msg):</strong> This attribute is used for send the output from the child to parent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*by0SfFNHAkcFWSFKkZfyQQ.png" /></figure><ul><li>Next, In the child component class declared @Output decorator with the ‘<strong>callback-msg</strong>’ parameter which I have put in child-app selector in parent html as an output attribute by using <strong>() braces</strong>. And front of the @Output decorator I have declared one Event Emitter variable with the type of string for emit the data. I have taken string data type because of I will pass string data.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*kFWD05OyMhXA2B1IDrQfsA.png" /></figure><ul><li>Now, whenever messageToEmit variable will emit the data from child component then receiveData() is called in parent component and data will be assigned to local variable in parent component class by using @Output parameter.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*yMh3zYMTqV-eA4wjcBW8Ww.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*2em9ncBfrbdetISAO-PivQ.png" /></figure><ul><li>Now, after run or application in the browser you can see when clicked on the button from the child view then message will display on the parent view. So, by using this concept you can implement the concept of get back data from child to parent component.</li></ul><h3><strong>Conclusion</strong></h3><p>So, we are understood the how we can implement @Input, @Output decorators. @Input decorator is used to pass data from parent to child, and @Output decorator used to get back data such as pass data from child to parent components.</p><p>If you want to be better in Angular then watch the following video for your best preparations.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F-jeoyDJDsSM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D-jeoyDJDsSM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F-jeoyDJDsSM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3691b6a0edfa16f889e20e9dfba64836/href">https://medium.com/media/3691b6a0edfa16f889e20e9dfba64836/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=337329bc7ac2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Angular Directive]]></title>
            <link>https://medium.com/@ubale.vikas9/angular-directive-8f36102192ff?source=rss-8ab4b912f082------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f36102192ff</guid>
            <category><![CDATA[angular-directive]]></category>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Vikas Ubale]]></dc:creator>
            <pubDate>Sun, 12 Apr 2020 12:56:52 GMT</pubDate>
            <atom:updated>2020-04-12T13:07:45.659Z</atom:updated>
            <content:encoded><![CDATA[<p>Directive in angular is a JavaScript class declared as <a href="http://twitter.com/Directive">@Directive</a>. It provides the instructions to which DOM elements transforms dynamically. Angular directives are most used feature in every angular application, used to extend the power of HTML. Some of the directives are predefined by angular, and another are custom directives which we are created by us. From Angular 2 version these directives are classified into three different types.</p><ol><li><strong>Component directive</strong></li><li><strong>Structural directive</strong></li><li><strong>Attribute directive</strong></li></ol><p><strong>1. Component directive :</strong> Component directives are used in main class and it contain the detail of how the component should be processed, and used at run time.</p><p><strong>2. Structural directive : </strong>Structural directives is used to changes into the DOM layout by adding or removing the DOM elements. Structural directives are starts with * sign before the directive. For example, <strong>*ngIf</strong> and <strong>*ngFor</strong>. Structural Directives affect the whole area in the DOM.</p><p><strong>Component code :</strong> In below code declared one array with the name as “DataList”. It contains some data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*_3xb8Uy7jTYnSBxgCZ4L_w.png" /></figure><p>HTML code:</p><ul><li><strong>*ngIf </strong>: This directive is in html tags when we show or hide elements browser at run time. It same like if else statements.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*Z97Ovljjqb80HmSkNp-Dlw.png" /></figure><ul><li><strong>*ngFor </strong>: This directive is use when we need to show dynamically changes in the array at run time. It same like for loop statements.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*fRQf-9TOUKP4ddDg_Tpeww.png" /></figure><p><strong>3. Attribute directive :</strong> Attribute directives are used to change the look and behavior of the DOM elements. For example: <strong>ngClass</strong>, <strong>ngStyle </strong>etc. These attributes can change the styles from the elements</p><ul><li><strong>ngStyle </strong>: This attribute is used to add css properties on the elements and it used to change the look of the DOM elements at runtime.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*D72P2BAi3L-F_zQNZ_Lxqg.png" /></figure><ul><li><strong>ngClass </strong>: This attribute is used to add css class on the elements and it used to change the look of the DOM elements at runtime.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*VB44uDxpn3TuWuXmDlwJgw.png" /></figure><p>So <strong>*ngIf, *ngFor, ngStyle, ngClass</strong> these are the build-in directives in angular. We can create custom directives.</p><p><strong>Custom Directive: </strong>These directives are created by us. We can create custom directive in component by using the @Directive decorator in class. In this class we need to define selector which we will used that selector as an attribute in html elements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*3YePDCpcNKsZWRvaRtrp4A.png" /></figure><ul><li>After the create directive class the we need to declare it into our module.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*1-nAOZUixtOF7GC-r2zECQ.png" /></figure><ul><li>Then we need to add this selector in where we want in html elements.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*hQ_g7HMNWkji_hJXTFTcfA.png" /></figure><p>So, at run time we can see the text into span element which we have defined in the directive class.</p><h3>Conclusion</h3><p>So, Directives provides the instructions to which DOM elements transforms dynamically, and they three type such as component, structural, and attribute directives. Some directives are built-in and also, we can create custom directives. we have understood the directives in angular and their types.</p><p>If you learn in Angular then watch the following video for your best practice.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F-jeoyDJDsSM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D-jeoyDJDsSM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F-jeoyDJDsSM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3691b6a0edfa16f889e20e9dfba64836/href">https://medium.com/media/3691b6a0edfa16f889e20e9dfba64836/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f36102192ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Angular Decorators]]></title>
            <link>https://medium.com/@ubale.vikas9/angular-decorators-9cd20fb8c263?source=rss-8ab4b912f082------2</link>
            <guid isPermaLink="false">https://medium.com/p/9cd20fb8c263</guid>
            <category><![CDATA[decorators]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[angular-decorator]]></category>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Vikas Ubale]]></dc:creator>
            <pubDate>Sun, 05 Apr 2020 06:54:53 GMT</pubDate>
            <atom:updated>2020-04-05T07:29:10.292Z</atom:updated>
            <content:encoded><![CDATA[<p>Decorators is used to declaration a class without modifying the original source code. For Decorators function we have using ‘<strong>@</strong>’ symbol. There have four types of decorators.</p><ol><li><strong>Class Decorators</strong></li><li><strong>Property Decorators</strong></li><li><strong>Method Decorators</strong></li><li><strong>Parameter Decorators</strong></li></ol><p><strong>1. Class Decorators:</strong> <em>Class Decorators allows you to attach meta data with the typescript class using which angular knows whether that class is a component or directive or module or etc.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*UC-ln6yWguyRPmMZUf9lQA.png" /></figure><p><strong>@NgModule</strong> :</p><p>This Decorator is used for defines Modules in angular, it contains some metadata like declarations, import, providers, bootstrap etc. Which is used for declare components, modules, services, and which component is a load first.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*X8BSwSSUaKJ1pWEnCQ6wEw.png" /></figure><p><strong>@Component:</strong></p><p>This Decorator is used to defines a component in angular, it contains metadata like selector, template, providers etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*q8Y9OuMlbWRdPxAYJBNJRg.png" /></figure><p><strong>2. Property Decorators: </strong>The property decorators is used inside of the class. In class we defines the properties and when we used a property decorators like <strong>@Input </strong>and <strong>@Output</strong> above the properties then properties automatically binds with the @input and @Output decorators.</p><p><strong>@Input:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*y4y8I_gu3WA9hsxcHx9guQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*4JBAB-zVt_qW5yz1a-bJmw.png" /></figure><p><strong>@Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*xeomYA7H8TL_3DRVZrOXQQ.png" /></figure><p><strong>3. Methods Decorators: </strong>Method decorator same as the property decorator but its applied on methods in the class. There have two decorator such as <strong>@HostListener</strong> and <strong>@HostBinding</strong>.</p><p><strong>@HostListener : </strong>Allow you to handle events of the host element in directive class.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*EyPkfh-ET1FPSJuvUdiaZw.png" /></figure><p><strong>@HostBinding</strong> <strong>:</strong> Allows you to set the properties of the host element from the directive class.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*oqCby8Ey2XwaJFkRnFDD1g.png" /></figure><p><strong>4. Parameter Decorators: </strong>allow us to decorate parameters in our class constructors. Manually inject particular service.</p><p><strong>@Inject:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*z7_pqaVc82mWrtx4Jim2FA.png" /></figure><h3><strong>Conclusion:</strong></h3><p>Here we shortly understand the decorators in the angular and their types. This decorator types explained shortly, for details concept you need to learn more.</p><p>If you learn in Angular then watch the following video for your best practice.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FFV2MXOygDTM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DFV2MXOygDTM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FFV2MXOygDTM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d79f845ccd2be5a55515fcb9064300c5/href">https://medium.com/media/d79f845ccd2be5a55515fcb9064300c5/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9cd20fb8c263" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ASP.NET MVC Application Life cycle]]></title>
            <link>https://medium.com/@ubale.vikas9/asp-net-mvc-application-life-cycle-73d55d5f66db?source=rss-8ab4b912f082------2</link>
            <guid isPermaLink="false">https://medium.com/p/73d55d5f66db</guid>
            <category><![CDATA[aspnet-mvc]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[mvc]]></category>
            <dc:creator><![CDATA[Vikas Ubale]]></dc:creator>
            <pubDate>Sat, 07 Dec 2019 10:07:27 GMT</pubDate>
            <atom:updated>2019-12-07T17:32:01.141Z</atom:updated>
            <content:encoded><![CDATA[<h3>MVC Application Life cycle</h3><p>Asp.Net MVC Application is used to develop web applications. Every web application execution has some basic flow. In Asp.Net MVC architecture has also some flow for executing the the application. For this flow we can say MVC life cycle. Now we will understand what exactly MVC life cycle. <br>In MVC application there have two main phases, <br> 1. Request Object. <br> 2. Response Object. <br> <br><strong>1. Create request object</strong> :<br> When the application started it creates the request to get response for some results. In request created in the MVC Applications it calling to the action methods in controller, This request object are divided into four parts such as <strong>Fill route</strong>, <strong>Fetch route</strong>, <strong>Request context created</strong>, <strong>Controller instance created</strong>.</p><p><strong>Request object process involved</strong>.</p><ul><li>The instance of the RouteTable class it created on when application start. Request of the router table are mapped with which controller actions to be invoked. RouteTable is responsible for mapping the mvc request from specific action methods.</li><li>UrlRoutingModule intercept each request, and find the route data from route table depending on the which contoller and action to be invoked.</li><li>Create a RequestObject using the RouteData. Gets the ActionsMethods from the RouteData based on the URL.</li><li>ActionsMethods returns the instance of a class using the ActionResults.</li></ul><p><strong>2. Create Response Object: </strong><br> When we request something we need some response in our application, so in response object there have two parts such as Execution, and Result sent.</p><p><strong>Response object process involved</strong>,</p><ul><li><strong>Execution Action</strong>: The controllers executes action methods.</li><li><strong>Result Sent: </strong>The Action Methods returns some response to the like action result, file result , and json results etc. There have also some others action results are used.</li></ul><h3><strong>Conculsion</strong></h3><p>So here we understand the life cycle of MVC Applications, In this there are two main parts in MVC life cycle such as Creating request of an application, and response to specific request.</p><p>If you learn in ASP.NET MVC then watch the following video for your best practice.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FLp7nSImO5vk%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLp7nSImO5vk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FLp7nSImO5vk%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1aa2c2332edc0b14b6bca94c780d6916/href">https://medium.com/media/1aa2c2332edc0b14b6bca94c780d6916/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73d55d5f66db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stack and Heap Memory]]></title>
            <link>https://medium.com/@ubale.vikas9/stack-and-heap-memory-2fc2a8229d1b?source=rss-8ab4b912f082------2</link>
            <guid isPermaLink="false">https://medium.com/p/2fc2a8229d1b</guid>
            <category><![CDATA[heap-and-stack-memory]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <dc:creator><![CDATA[Vikas Ubale]]></dc:creator>
            <pubDate>Sat, 07 Dec 2019 06:07:31 GMT</pubDate>
            <atom:updated>2019-12-07T06:08:31.389Z</atom:updated>
            <content:encoded><![CDATA[<h3>Stack and Heap Memory in C#</h3><p>In the programming we do lots of code, at somewhere we need to store some data to the variables, but these variables are stored between two types memory that are Stack and Heap memory. These stack and heap memory are stored in <strong>RAM</strong>. Before we discuss about stack and heap memory, we need to understand value types, and reference types.</p><p><strong>Value Types : </strong>In the value type, <em>“</em><strong><em>the same memory location allocated even variables values are changed”</em></strong></p><ul><li>In below code there have two integer variables such as<strong> i </strong>and <strong>j</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*alpQdvtyoGC9u-bIQ8qH6w.jpeg" /></figure><ul><li>when the execution happening, first i value allocated to stack.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*7WMN7BPCMq6khEZKl-QTNw.png" /></figure><ul><li>Then moved to next line, value of i assigned to j variable. and j allocated to second stack.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*iTh0KzT44NARbTrvuCCYnQ.png" /></figure><ul><li>If new value assigned for j variable, then there have both are different copies allocated to stack memory.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*wq6ZAd1LDNs3_YMYLHDrfw.png" /></figure><p><strong>Reference Type : </strong>In C# the reference type is a variable that “<strong><em>holds the reference of memory address</em>”.</strong></p><ul><li>In below the code there have two instances of same class and class has one integer variable.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*ok_Az6jehFCuXoGfLq1Y8Q.jpeg" /></figure><ul><li>When main method execution started, first class1 instance is created i.e. <strong>obj. </strong>After the instance created, at second line value 10 is assigned to i variable from class1.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zm2Z2NwTjVw3rCgFYMKrTg.png" /></figure><ul><li>Then after the second instance created for same class. Then we can see the value of <strong>i </strong>variable from the first object is assigned to second object</li></ul><p>i.e <strong>obj.i = 10 , </strong>and <strong>obj2.i =10</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dbvr9ligLjrogtr6R_JirQ.png" /></figure><ul><li>Move to the next, now obj2.i value has changed i.e <strong>obj2.i=20</strong></li><li>Here we can see, when the second objects value has been changed the first value became changed. Now both value has same value. For this we called also reference type, the variable holds the reference of the memory address.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QeltRO7EuOAeEEk5rEFUPg.png" /></figure><p>Now we see the what is stack memory and heap memory.</p><p><strong>Stack Memory: </strong>The<strong> value type</strong> created on the stack memory.</p><p>In above code when the main method will execute,</p><ul><li><strong>First line execution:</strong> value 2 is assigned for integer i then that i variable is stored in the stack 1.</li><li><strong>Second Line Execution:</strong> value 4 is assigned for integer j then that j variable is stored in stack 2. j</li></ul><p>So, the stack is created separate copies of two different variables.</p><p><strong>Heap Memory: </strong>The <strong>reference type </strong>created on heap memory.</p><ul><li>In above code class1 instance is created i.e. <strong>obj</strong>. when we declare <strong>new class1() </strong>that means the obj is stored in the heap memory. This a reference type, here variable holds the memory address. So, in heap memory when the value is changed of any variable from that object the other references values also changed.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*zLEMrhugVthZFphi-jeRtg.png" /></figure><h3><strong>Conclusion</strong></h3><p>Here we conclude that the stack memory is created using the value types and the heap memory is created using the reference types.</p><p>If you learn in C# then watch the following video for your best practice.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FUI2RRcsR83s%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DUI2RRcsR83s&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FUI2RRcsR83s%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d337464fe53857789bf21dbd5dfbdab2/href">https://medium.com/media/d337464fe53857789bf21dbd5dfbdab2/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2fc2a8229d1b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Thread in C#]]></title>
            <link>https://medium.com/@ubale.vikas9/thread-in-c-6086885a5c21?source=rss-8ab4b912f082------2</link>
            <guid isPermaLink="false">https://medium.com/p/6086885a5c21</guid>
            <category><![CDATA[threads]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <dc:creator><![CDATA[Vikas Ubale]]></dc:creator>
            <pubDate>Sun, 24 Nov 2019 10:10:55 GMT</pubDate>
            <atom:updated>2019-11-24T10:10:55.671Z</atom:updated>
            <content:encoded><![CDATA[<p>In C# programming the normal way of execution is depending on sequence of whatever code we are written. So sometime we need to execute some functions at same time, at that time we need to use threading. “<strong><em>Threading is the concept of executing multiple task parallel</em></strong><em>.</em>” So we can use threading in our C# programming for executing multiple function parallel.Let’s understand with an example.</p><p>Here you see the main application called two methods are Function 1, and Function 2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*skKwffENZeX8z4UJTBCZ8A.png" /></figure><p>We got the output, in this output we can see the methods are executed one after one. So in this way the function 2 wait for execution of function 1. For avoiding waiting process we can create thread, so using of thread don’t need to wait for other functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*7pk2PRKFgW7qkfJ2Kv4yWw.png" /></figure><p>Now we can see in above code two thread objects are created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2cLhskv9QRKChacAKDy4Jg.png" /></figure><p>We will pass functions as a parameter in thread objects. and above code is function 1 and function two, in that there have some executions and also we put there <strong>Thread.Sleep(), </strong>because of thread.sleep() the function stopped specified time and between that time execute another function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*r0JTW8jT25PzTki5r8q-XQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*BckJ6adi5fzHG95aw_0WtQ.png" /></figure><p><strong>Output</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*xZNnm0ON4K9oOh8GAigelA.png" /></figure><p>There have two types of threading.<br><strong>1. Foreground Threading</strong><br> In this type of threading, thread is still executing even main application get exited.</p><p><strong>2. Background Threading</strong><br> In this type of threading, thread is stopped executing when main application get exited.</p><p>we can create background thread using =&gt;<br> <strong>obj1.IsBackground = true;</strong></p><p>once you put this thread object background is true then the thread is topped when main application get exited.</p><h3>Conclusion</h3><p>Here we understood the threading and its type, So simply threading is the concept of running multiple task parallely and it has also two types such as foreground threading and background threading.</p><p>If you learn in C# then watch the following video for your best practice.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FFzckqczmgd0%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DFzckqczmgd0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FFzckqczmgd0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a8ce549e8f1eb5aafe813a0aadc8cd07/href">https://medium.com/media/a8ce549e8f1eb5aafe813a0aadc8cd07/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6086885a5c21" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Thread Safe in C#]]></title>
            <link>https://medium.com/@ubale.vikas9/thread-safe-in-c-5c139c128fb7?source=rss-8ab4b912f082------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c139c128fb7</guid>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[threads]]></category>
            <dc:creator><![CDATA[Vikas Ubale]]></dc:creator>
            <pubDate>Sun, 24 Nov 2019 10:01:11 GMT</pubDate>
            <atom:updated>2019-11-24T10:09:36.762Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article we will understand how we make object thread safe using <strong>lock</strong> , and <strong>monitor </strong>in multi-threading. when we create multiple threading at that time more chance to get exception in our application. Let’s see the thread safety using example.</p><p>we create one code for multiple thread,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wUCeduWmKFfiBohoJzj7qQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*t1_v6Yen69-iw4G9wAxWUQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2XxefdctYwc8wagiL-P_Eg.png" /></figure><p>Here we got the exception because of, There have two thread in main application and both are calling divide function, so its possible to get exception here. To avoiding that kind of exception we need to do proper thread synchronization techniques.</p><ol><li>Lock</li><li>Mutex</li><li>Semaphore</li></ol><p>For now let’s discuss on Lock thread.</p><p><strong>Lock Thread</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*_ZH2YJbdkjmPePx19uuDcw.png" /></figure><p><strong>Lock </strong>provides the thread safety in multi-threaded application in C# . The lock keyword specified only one thread can be executed on at a time. when we use lock thread then only those line of code executed which is given in the scope of lock for specific thread. So by using of this lock thread we can avoid getting exception.</p><p>There is another one mechanism for thread safety is <strong>monitor.</strong></p><p><strong>Monitor </strong>class is a collection of static methods that provides access to the monitor associated with a particular object.</p><p>We start to monitor our object logic using,</p><p><strong>Monitor.Enter(object);</strong></p><p>and end monitor using</p><p><strong>Monitor.Exit(object);</strong></p><p><strong>Conclusion</strong></p><p>Here we understood the thread safety in threading concept, we provide safety of multiple threading to avoid crash our applications. There have some mechanism to provide thread safety such as <strong>lock , Mutex, Semaphore </strong>etc.</p><p>If you learn in C# then watch the following video for your best practice.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FFzckqczmgd0%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DFzckqczmgd0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FFzckqczmgd0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a8ce549e8f1eb5aafe813a0aadc8cd07/href">https://medium.com/media/a8ce549e8f1eb5aafe813a0aadc8cd07/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c139c128fb7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Polymorphism in OOPS]]></title>
            <link>https://medium.com/@ubale.vikas9/polymorphism-in-oops-8ff95a4f44f7?source=rss-8ab4b912f082------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ff95a4f44f7</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[oops-concepts]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Vikas Ubale]]></dc:creator>
            <pubDate>Sat, 08 Jun 2019 09:07:13 GMT</pubDate>
            <atom:updated>2019-06-11T11:38:51.164Z</atom:updated>
            <content:encoded><![CDATA[<p>The polymorphism is the concept OOPS. This is related to real world behavior. In our world there have most of some things are behavior in different way. For example, the man behave in different things like when he was in office then he is employee, when he is in front of his wife then he became a husband, when he is in front of his children’s then he became a father. So here is process of one thing with different act.</p><p><strong>Definition:</strong></p><p>In programming terms the polymorphism happened in same things like man behavior. The polymorphism defined as the, depending on the situation it’s behaved in different way. One object has many forms or one name with multiple functionalities. Polymorphism provides the ability to class have multiple implementations with same name.</p><p>There have two types of polymorphism,</p><p>1. Static / Compile time polymorphism</p><p>2. Dynamic / Run-time polymorphism</p><p><strong>1.</strong> <strong>Static / Compile time polymorphism</strong></p><ul><li>The method overloading is an example of static polymorphism.</li><li>In overloading the method or function has a same name but different parameters is also known as compile time polymorphism because the decision of which method is called is done at compile time.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*KaXRqOhDu1H258X3HRKUDA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*rpJq633sDOUIWaM5cfb_Fg.png" /></figure><ul><li>In main method created instance of calculator class and call result method with two different parameter in different call, so depending on the parameter it checks the method and gives the output. So here is static parameter done.</li></ul><p><strong>2.</strong> <strong>Dynamic / Run-time polymorphism.</strong></p><ul><li>Method overriding is an example of dynamic polymorphism and it also known as late binding. Method overriding can be done using inheritance.</li><li>In dynamic polymorphism we override a base class function using virtual or override keyword. Method overriding means having two or more methods with the same name, same parameter but with different implementation.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*l_Z5Tk7o4Mda8N-dL0f_qQ.png" /></figure><ul><li>In above example we created one base class and derived class. In both class there same methods but different implementation so this is method over.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/471/1*6NHIjqwTL4gbwrU3cVAAVQ.png" /></figure><ul><li>We can call same method by creating different object, but we got different output because here only same method name but it has different implementation.</li></ul><p><strong>Conclusion:</strong></p><p>So here we are conclude that polymorphism is a process of behavior depending on different situations. And it has two types static and dynamic polymorphism.</p><p>If you learn OOPS concept in details using C# then watch the following video for your best practice.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FUI2RRcsR83s%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DUI2RRcsR83s&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FUI2RRcsR83s%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d337464fe53857789bf21dbd5dfbdab2/href">https://medium.com/media/d337464fe53857789bf21dbd5dfbdab2/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ff95a4f44f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Interface in OOPS]]></title>
            <link>https://medium.com/@ubale.vikas9/interface-in-oops-6eae3731c242?source=rss-8ab4b912f082------2</link>
            <guid isPermaLink="false">https://medium.com/p/6eae3731c242</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[oops-concepts]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Vikas Ubale]]></dc:creator>
            <pubDate>Wed, 05 Jun 2019 10:35:33 GMT</pubDate>
            <atom:updated>2019-06-06T10:44:50.410Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Definition:</strong></p><p>An interface is a contract between itself and any class that implements it. Interface can have methods, properties, or events. It contains only declaration of its members and implementation of its members will be given by the class who implements the interface. Interface makes it easy to maintain the program. Following are the specified terms of interface.</p><ul><li>An interface can be defined by using interface <strong>keyword</strong>.</li><li>Interface can’t have private members.</li><li>By default all members of interface are public.</li><li>Interface enforces to the class for implementing its members in a class.</li><li>We can implementing the interface in two different ways as following,</li></ul><p>1. Implicit</p><p>2. Explicit</p><p><strong>Syntax of interface declaration:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/290/1*7scRGsPssx1rCck9JjZseg.png" /></figure><p><strong>Syntax of implementing interface:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/302/1*vbIlOZeEc0d4Y9Q97N3ivQ.png" /></figure><p><strong>Example:</strong></p><ol><li><strong>Implicit interface:</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/1*rXIIqGaqJ9RsuTyAWnwVJA.png" /></figure><ul><li>Here we declare interface and given name as <strong>InterfaceCompany </strong>and <strong>EmployeeDetails()</strong> is a method which is member of InterfaceCompnay.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/447/1*f_cX819yzrgJ7UPYFeCzMw.png" /></figure><ul><li>Now implement the interface to a class Employee by given colon operator Like, <strong>Class Class_Name : Interface{ }</strong></li><li>The implementation of interface methods in done by class Employee.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*QptmjQPevupi7nliWQv6Gg.png" /></figure><ul><li>So after implementing the code in class now we can create the object of that interface and call the interface methods in main method.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*Tq4Qoa8uhr0wLVlwNKVvOg.png" /></figure><p><strong>2.</strong> <strong>Explicit Interface:</strong></p><p>Another one type of interface is explicit interface. We can use multiple interfaces in our program so there is some problems occurred if same method name from different interface, so here we can use explicit interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*qJ1SJ3sgaS2X6JmTmCJrQQ.png" /></figure><ul><li>In above example we created two interface InterfaceCompnay, and InterfaceDepartment.</li><li>At sometimes there have need of multiple interfaces and there some methods are same name.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*Q1JDfRU6ESoffzBhjh8zig.png" /></figure><ul><li>In above class Employee there have multiple interfaces implemented.</li><li>There is EmployeeDetails() method name is same in both interface, so here lots of confusion in class for implementing the EmployeeDetails() method. So here need of implement explicit interface.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*Bs4Ga68JCBucLF04q312FA.png" /></figure><ul><li>We use interface name for accessing the methods. Because of that we got exact methods for implementing.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/437/1*x3A-nRP2WW3msPO0ZeU9rg.png" /></figure><ul><li>Let’s see in the main class created different objects of the interface.And we can see the different output as per our requirement.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*XZSJHKRMk7qJqudQWJPGOQ.png" /></figure><p><strong>Conclusion:</strong></p><p>So here we conclude that the interface only has members and that members are implemented by the class. There have two types of interface like implicit and explicit. We use interface <strong>keyword </strong>for declaring the interface.</p><p>If you are new to programming then one of the best way is to learn programming with project following we have one such video which demonstrate practical using C# and .NET: -</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FUI2RRcsR83s%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DUI2RRcsR83s&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FUI2RRcsR83s%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d337464fe53857789bf21dbd5dfbdab2/href">https://medium.com/media/d337464fe53857789bf21dbd5dfbdab2/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6eae3731c242" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>