W
Walid
Hey,
I was trying some code with the .Net framework 1.1, and I found that the
Interface name collisions is still not resolved in that version of the .net
framework.
I am refering to that piece of code which i took from the book of Inside C#
(Archer).
using System;
interface ISerializable
{
void SaveData();
}
interface IDataStore
{
void SaveData();
}
class Test : ISerializable, IDataStore
{
public void SaveData()
{
Console.WriteLine("Test.SaveData called");
}
}
class NameCollisions1App
{
public static void Main()
{
Test test = new Test();
Console.WriteLine("Calling Test.SaveData()");
test.SaveData();
}
}
the code is still compiling, although logically it shouldn't.
So My question is Why this is not resolved ?
and is there an apparent benefit from this capability that i am not aware
of?
regards
I was trying some code with the .Net framework 1.1, and I found that the
Interface name collisions is still not resolved in that version of the .net
framework.
I am refering to that piece of code which i took from the book of Inside C#
(Archer).
using System;
interface ISerializable
{
void SaveData();
}
interface IDataStore
{
void SaveData();
}
class Test : ISerializable, IDataStore
{
public void SaveData()
{
Console.WriteLine("Test.SaveData called");
}
}
class NameCollisions1App
{
public static void Main()
{
Test test = new Test();
Console.WriteLine("Calling Test.SaveData()");
test.SaveData();
}
}
the code is still compiling, although logically it shouldn't.
So My question is Why this is not resolved ?
and is there an apparent benefit from this capability that i am not aware
of?
regards