当前位置: 首页>>代码示例>>C#>>正文


C# SqlTypes.SqlSingle类代码示例

本文整理汇总了C#中System.Data.SqlTypes.SqlSingle的典型用法代码示例。如果您正苦于以下问题:C# SqlSingle类的具体用法?C# SqlSingle怎么用?C# SqlSingle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SqlSingle类属于System.Data.SqlTypes命名空间,在下文中一共展示了SqlSingle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Box

 public static object Box(SqlSingle a)
 {
     if (a.IsNull)
         return null;
     else
         return a.Value;
 }
开发者ID:valery-shinkevich,项目名称:sooda,代码行数:7,代码来源:SoodaNullable.cs

示例2: Properties

        public void Properties()
        {
            SqlSingle Test = new SqlSingle(5443e12f);
            SqlSingle Test1 = new SqlSingle(1);

            Assert.True(SqlSingle.Null.IsNull);
            Assert.Equal(5443e12f, Test.Value);
            Assert.Equal(1, Test1.Value);
        }
开发者ID:dotnet,项目名称:corefx,代码行数:9,代码来源:SqlSingleTest.cs

示例3: Properties

                public void Properties()
                {
                        SqlSingle Test = new SqlSingle (5443e12f);
                        SqlSingle Test1 = new SqlSingle (1);

                        Assert ("#C01", SqlSingle.Null.IsNull);
                        AssertEquals ("#C02", 5443e12f, Test.Value);
                        AssertEquals ("#C03", (float)1, Test1.Value);
                }
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:9,代码来源:SqlSingleTest.cs

示例4: Properties

                public void Properties()
                {
                        SqlSingle Test = new SqlSingle (5443e12f);
                        SqlSingle Test1 = new SqlSingle (1);

                        Assert.IsTrue (SqlSingle.Null.IsNull, "#C01");
                        Assert.AreEqual (5443e12f, Test.Value, "#C02");
                        Assert.AreEqual ((float)1, Test1.Value, "#C03");
                }
开发者ID:Profit0004,项目名称:mono,代码行数:9,代码来源:SqlSingleTest.cs

示例5: Create

                public void Create()
                {
                        SqlSingle Test= new SqlSingle ((float)34.87);
                        SqlSingle Test2 = 45.2f;
                        
                        AssertEquals ("#A01", 34.87f, Test.Value);
                        AssertEquals ("#A02", 45.2f, Test2.Value);

                        Test = new SqlSingle (-9000.6543);
                        AssertEquals ("#A03", -9000.6543f, Test.Value);
                }
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:11,代码来源:SqlSingleTest.cs

示例6: Create

                public void Create()
                {
                        SqlSingle Test= new SqlSingle ((float)34.87);
                        SqlSingle Test2 = 45.2f;
                        
                        Assert.AreEqual (34.87f, Test.Value, "#A01");
                        Assert.AreEqual (45.2f, Test2.Value, "#A02");

                        Test = new SqlSingle (-9000.6543);
                        Assert.AreEqual (-9000.6543f, Test.Value, "#A03");
                }
开发者ID:tohosnet,项目名称:Mono.Data.Sqlite,代码行数:11,代码来源:SqlSingleTest.cs

示例7: Add

		public static SqlSingle Add (SqlSingle x, SqlSingle y)
		{
			return (x + y);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:4,代码来源:SqlSingle.cs

示例8: NotEquals

		public static SqlBoolean NotEquals (SqlSingle x, SqlSingle y)
		{
			return (x != y);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:4,代码来源:SqlSingle.cs

示例9: LessThanOrEqual

		public static SqlBoolean LessThanOrEqual (SqlSingle x, SqlSingle y)
		{
			return (x <= y);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:4,代码来源:SqlSingle.cs

示例10: GreaterThanOrEqual

		public static SqlBoolean GreaterThanOrEqual (SqlSingle x, SqlSingle y)
		{
			return (x >= y);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:4,代码来源:SqlSingle.cs

示例11: Equals

		public static SqlBoolean Equals (SqlSingle x, SqlSingle y)
		{
			return (x == y);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:4,代码来源:SqlSingle.cs

示例12: CompareSqlSingle

		private int CompareSqlSingle (SqlSingle value)
		{
			if (value.IsNull)
				return 1;
			else
				return this.value.CompareTo (value.Value);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:7,代码来源:SqlSingle.cs

示例13: SetCapacity

 override public void SetCapacity(int capacity) {
     SqlSingle[] newValues = new SqlSingle[capacity];
     if (null != values) {
         Array.Copy(values, 0, newValues, 0, Math.Min(capacity, values.Length));
     }
     values = newValues;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:7,代码来源:SQLSingleStorage.cs

示例14: Subtract

        /**
         * The subtraction operator the second SqlSingle operand from the first.
         * @param x A SqlSingle instance
         * @param y A SqlSingle instance
         * @return The results of the subtraction operation.
         */
        public static SqlSingle Subtract(SqlSingle x, SqlSingle y)
        {
            if (x.IsNull || y.IsNull)
                return SqlSingle.Null;

            float xVal = x._value;
            float yVal = y._value;

            if (xVal < 0 && yVal > 0 && (java.lang.Math.abs(_minVal - xVal) < yVal))
                throw new System.OverflowException("Overflow - " + x + " - " + y + " < " + _minVal);
            if (xVal > 0 && yVal < 0 && (_maxVal - xVal < java.lang.Math.abs(yVal)))
                throw new System.OverflowException("Overflow - " + x + " - " + y + " > " + _maxVal);


            return new SqlSingle(x._value - y._value);

        }
开发者ID:runefs,项目名称:Marvin,代码行数:23,代码来源:SqlSingle.cs

示例15: NotEquals

        /**
         * Compares two instances of SqlSingle to determine if they are equal.
         * @param x A SqlSingle instance
         * @param y A SqlSingle instance
         * @return A SqlBoolean that is True if the two instances are not equal or False if the two instances are equal.
         * If either instance of SqlSingle is null, the Value of the SqlBoolean will be Null.
         */
        public static SqlBoolean NotEquals(SqlSingle x, SqlSingle y)
        {
            SqlBoolean res = Equals(x, y);

            if (res.IsNull)
                return res;
            if (res.IsFalse)
                return SqlBoolean.True;

            return SqlBoolean.False;
        }
开发者ID:runefs,项目名称:Marvin,代码行数:18,代码来源:SqlSingle.cs


注:本文中的System.Data.SqlTypes.SqlSingle类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。