Interfaces define properties, methods, and events, which are the members of the interface. Interfaces contain only the declaration of the members. It is the responsibility of the deriving class to implement all properties and events methods.
using System.Collections.Generic; using System.Linq; using System.Text; using System;
namespace InterfaceApplication { public interface ITransactions { // interface members void ViewTransaction(); double GetTransactionAmount(); }
public class Transaction : ITransactions { private string TransactionCode; private string TransactionDate; private double TransactionAmount; public Transaction() { TransactionCode = " "; TransactionDate = " "; TransactionAmount = 0.0; }
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Interfaces define properties, methods, and events, which are the members of the interface. Interfaces contain only the declaration of the members. It is the responsibility of the deriving class to implement all properties and events methods.