Posts

Showing posts from May, 2016

POC on Grid View Add item to list,Delete row

POC on Grid View Add item to list,Delete row 1) create an Employee List 2)Add TextBox to enter the details 3)Add Employee details in the Grid View as a new row 4)Add CheckBox to select the list 5)Remove the Checked list. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace GridView {         public partial class Form1 : Form     {         EmployeeController ec = new EmployeeController();         DataGridViewCheckBoxColumn checkbox = new DataGridViewCheckBoxColumn();         public Form1()         {                       ...

Interface can inherit from Interface,Abstract class can inherit from Interface

Interface can inherit from Interface,Abstract class can inherit from Interface and declare the method as abstract namespace Reflection {     //Interface-1     interface IB     {         void mymessageB();     }     //Interface-2 extending 1     interface IA:IB     {         void mymessageA();     }     //Abstract extending Interface2 ,Interface1 , butimplementing only one interface1     public abstract class Atest: IA     {         public abstract void mymessageA();         public void mymessageB()         {             Console.WriteLine("My Message B");       ...

MEF - POC

MEF - POC for Dependency Injection     interface ILogger     {         void Write(string messgae);     }  class hostMEFApplication     {         [ImportMany]                 protected IEnumerable<ILogger> Logger { get; set; }         public void run()         {             Compose();             foreach(var log in Logger)             log.Write("Hello World from MEF");         }         private void Compose()         {    ...
Factory Design Patten Application : Adding Items to Cart List and calculating the total price in Windows Form UI Form Design: ------------------------------------------------------------------------------------------------ namespace ShoppingCart {     partial class Form1     {         /// <summary>         /// Required designer variable.         /// </summary>         private System.ComponentModel.IContainer components = null;         /// <summary>         /// Clean up any resources being used.         /// </summary>         /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>    ...