我想定義一個變量,將接受該集的字符串,但然後將其轉換爲Int32,並使用了GET過程。獲取/設置不同類型的
這裏說我現在有代碼:
private Int32 _currentPage;
public String currentPage
{
get { return _currentPage; }
set
{
_currentPage = (string.IsNullOrEmpty(value)) ? 1 : Convert.ToInt32(value);
}
}
什麼是你的問題? – 2011-03-22 19:30:49