How to use interfaces in .Net An interfaces contains only the signatures of methods.The implementation of the methods is done in the class that implements the interface. SYNTAX: interface interface_name { void method1() void method2() } By default all the methods in interfaces are fully "public abstract" Example: ======= interface inter1 { void getdata(); void putdata(); } class sample1:inter1 { int eno; string ename; { public void getdata() { console.writeline("enter employee number"); eno=int.parse(console.readline()); console.writeline("enter employee name"); ename=console.readline(); } public void putdata() { console.writeline("employee number:"+eno); console.writeline("employee name:"+ename); } } class class1 { static void main () { sample1 obj=new sample1(); obj.getdata(); console,.writeline(); obj.putdata(); } ...
ERP Project Management,Asp.net,PL SQL Tips for error resolution,Research,Software Errors and solution,SQL 2014,2012,2008,Procedural language,SP,Power BI,excel macro ,Musical notations,Business software,Degree, diploma related informations.