GetInt64() public method

Returns a long that contains the value of the specified variable.
public GetInt64 ( string name, long defaultValue ) : long
name string The name of the variable to be read.
defaultValue long The value to be returned if returns null.
return long
Beispiel #1
0
        public void GetInt64()
        {
            VariableAccessor va = new VariableAccessor(_testVariableSource);

            Assert.AreEqual((long)1, va.GetInt64("ValidInt64", 2));
            Assert.AreEqual((long)2, va.GetInt64("InvalidInt64", 2, false));
        }
 public void GetInt64()
 {
     VariableAccessor va = new VariableAccessor(_testVariableSource);
     Assert.AreEqual((long)1, va.GetInt64("ValidInt64", 2));
     Assert.AreEqual((long)2, va.GetInt64("InvalidInt64", 2, false));
     try
     {
         va.GetInt64("InvalidInt64", 2, true);
         Assert.Fail();
     }
     catch { }
 }