סינטקס ?? ב#c מה אומרים ?? ב#C כמו פה return (Int32)(ViewState["Offset"] ?? 0);
R Raist New member 26/1/07 #1 סינטקס ?? ב#c מה אומרים ?? ב#C כמו פה return (Int32)(ViewState["Offset"] ?? 0);
J J u n k y New member 26/1/07 #2 מתוך הרפרנס של #C ?? Operator (C# Reference) The ?? operator returns the left-hand operand if it is not null, or else it returns the right operand.אני מודה שלא הייתי מודע לאופרטור הזה (אפילו כתבתי פונקציה IsNull שעושה בדיוק אותו דבר ).
מתוך הרפרנס של #C ?? Operator (C# Reference) The ?? operator returns the left-hand operand if it is not null, or else it returns the right operand.אני מודה שלא הייתי מודע לאופרטור הזה (אפילו כתבתי פונקציה IsNull שעושה בדיוק אותו דבר ).