So........We know "as" is a powerful method that perform certain types of conversions between compatible reference types. for example:

 

// ...... //
Array[] = dataTable;
// ....do something for dataTable.//
const string = "ALamTest";
Session[ALamTest] = dataTable;

//....do another something...//

Array[] getTable = Session[AlamTest] as Array[]

When we use Session Mechanism, "as" is a useful method let us to redesign the object which is taken out from the session.

arrow
arrow
    全站熱搜

    imagefish 發表在 痞客邦 留言(0) 人氣()