I found some interesting undocumented keywords (http://www.eggheadcafe.com/articles/20030114.asp):
__makeref, __refvalue, __reftype, __arglist.
Here are a few examples:
int i = 10;
TypedReference tr = __makeref(i);
Type t = __reftype(tr);
int j = __refvalue( tr,int);
protected void Page_Load(Object sender, EventArgs e)
{
int x=85;
string y = "a stringy thingy";
double d=19.45;
WriteToPage(__arglist(x,y,d));
}
public void WriteToPage(__arglist)
{
ArgIterator ai = new ArgIterator(__arglist);
while(ai.GetRemainingCount() >0)
{
TypedReference tr = ai.GetNextArg();
Response.Write(TypedReference.ToObject(tr)+"");
}
}
Saturday, September 02, 2006
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment