Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
5
Reply
Interface
Maha
Mar 25 2015 3:05 PM
959
Reply
It is said that public modifier is used to access a class from outside.
public void
IA1
.Foo1() method is not accessible from the main method. But
void
IA1.Foo1() method is accessible from the main method. Please tell me reason. Problem is highlighted.
using System;
interface IA1
{
void Foo1();
}
class CA : IA1
{
public void IA1.Foo1()
{
Console.WriteLine("In Foo2 of CA");
}
}
class Program
{
static void Main(string[] args)
{
IA1 a1; CA a;
a = new CA();
a1 = new CA();
a1.Foo1();
Console.ReadKey();
}
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
5
)
Next Recommended Forum
Save ComboBox to Database and retrieve the information back.
increment value for each click