Trung Do Thanh

Trung Do Thanh

  • NA
  • 40
  • 2.9k

Asked to declare in C #

Sep 18 2012 10:31 PM
Hi everyone,
New I would like to ask the types of programming such declaration is this:
Please people just help
1. Function declaration
IEnumerable <MyEntity> LoadMyEntities (Expression <Func <MyEntity, bool>> predicate)
{
/ / Coding here ...
}
===================
2. this.Load + = new System.EventHandler (this.Page_Load);
===================
3. public enum e_IsReimbursement
{
NO = 0,
YES = 1
}
===================
4.public enum e_DaysOfWeek
{
Monday,
TUESDAY,
WEDNESDAY,
Thursday,
FRIDAY,
SATURDAY,
SUNDAY,
HALF_SATURDAY
}
===================
5. Declaration type enum is nothing better than a const variable
public const string DEFAULT_SELECTED_DEPARTMENT = "<---- Select Department ---->";
===================
6. Text <T> ie what
private T GetObjectFromLmsCache <T> (QueryParser queries, out string sqlString, and out bool keyExist)
{
/ / Coding here ...
}
===================
7. Explained in this function declaration
public override IList <T> getObjectListFromDb <T> (QueryParser query)
{
string sqlString;
bool keyExist;

IList <T> returnValue = GetObjectFromLmsCache <IList <T>> (queries, out sqlString, and out keyExist);
if (keyExist)
{
return returnValue;
}

returnValue = base.getObjectListFromDb <T> (query);

SetObjectToLmsCache (sqlString, returnValue);
return returnValue;
}


Happy if people interested tohelp.
Sincerely thank you.

Answers (6)