Feeds:
文章
留言

Archive for 四月 25th, 2006

[C#] Value 型別不支援 as

public struc XType{
  public string X;
  public string Y;
  public string Z;
}
 
// 取得一個 Object
object obj = Factory.GetObject();
 
XType t = obj as object; // ERROR: Error 1 The as operator must be used with a reference type

Read Full Post »