Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

.NET C# Explicit implementation of grandparent's interface method in the parent interface -


that title's mouthful, isn't it?...

here's i'm trying do:

public interface ibar {      void bar(); } public interface ifoo: ibar {     void foo(); } public class fooimpl: ifoo {     void ifoo.foo()   { /* works expected */ }     //void ifoo.bar() { /* i'd this, doesn't compile */ }      //so i'm forced use instead:     void ibar.bar()   { /* compile */ } } 

my problem it's... inconvenient call bar():

ifoo myfoo = new fooimpl(); //myfoo.bar(); /* doesn't compile */ ((ibar)myfoo).bar(); /* works, it's not obvious                          fooimpl ibar */ 

so... there way declare ifoo.bar(){...} in class, other merging 2 interfaces one?

and, if not, why?

it's possible use new keyword in interface explicitly hide member declared in interface extends:

public interface ibar {     void bar(); }  public interface ifoo:ibar {     void foo();     new void bar(); }  public class class1 : ifoo {     void bar(){}      void ifoo.foo(){}      void ifoo.bar(){}      void ibar.bar(){} } 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -