Posts

Showing posts from November, 2018

How to create services in Angular 2

Before starting this article you must have some basic knowledge on Angular 2 , typescript and how  to set up the Angular 2 application. If you are a newbie to Angular 2 then you can follow my below links . I am sure you will able to write the Angular 2 applications within 5 minutes. What is typescript ? http://whymysolutions.blogspot.com/2017/09/what-is-typescript.html Angular 2 project set up in Visual studio code and a Small Angular 2 application example. https://whymysolutions.blogspot.com/2018/09/angular2-application-in-visual-studio.html If you are comfortable with basic of Angular 2 then you can directly learn this article step by step. First we will describe the service creation and then we will use it in a small application. Step 1 : Create the service file     First we will create a file having the name as  m ydemoservice.service.ts . Here the *.service.ts* will same but the file name you can change.  Step 2 :  Imp...

base keyword in C Sharp.

base keyword is used to refer the Base class member . Base class is also called as Parent class and Super class as well. So when to use base Keyword. > To access the base class method which is overridden in child class . > If you want to access the base class constructor while creating the child class object . Lets explain it an example. Case-1 : public class PersonDetails {     protected string name = "John";     public virtual void GetInfo()     {         Console.WriteLine("MyName: {0}", name);     } } class EmployeeDetails : PersonDetails {     public string empid = "AA23";     public override void GetInfo()     {         base.GetInfo();         Console.WriteLine("Employee ID: {0}", empid);     } } class TestClass1 {     static void Main()     {         Employee...