interface IFoo { void Bar();}
class Foo : IFoo {public void Bar() { /* imp 1 */ } }
class FooWrapper : IFoo {
IFoo parent;
public FooWrapper(IFoo parent) {this. parent = parent;}
public void Bar() { /* imp 2, perhaps using "parent" }
}
public class BaseUser {
public BaseUser() {}
public bool login() {
return false;
}
}
public class User : BaseUser {}
User u = new User();
u.login();
public static int WeekNumber(this DateTime dtPassed)
{
CultureInfo ciCurr = CultureInfo.CurrentCulture;
int weekNum = 0;
try
{
weekNum = ciCurr.Calendar.GetWeekOfYear(dtPassed,
CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Sunday);
}
catch (Exception ex)
{
//TODO: Add error handling code
}
return weekNum;
}