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


C# Area.ToString方法代码示例

本文整理汇总了C#中Area.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Area.ToString方法的具体用法?C# Area.ToString怎么用?C# Area.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Area的用法示例。


在下文中一共展示了Area.ToString方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AreaRange_ToString_AreaFullRange1

 public void AreaRange_ToString_AreaFullRange1()
 {
     Area<string> a = new Area<string>("a", "10", "19");
      Assert.AreEqual<decimal>(0.1m, a.Start);
      Assert.AreEqual<decimal>(0.2m, a.End);
      Assert.AreEqual(a.ToString(), "1");
 }
开发者ID:gsimion,项目名称:AreaDestination,代码行数:7,代码来源:RangeTest.cs

示例2: AreaRange_ToString_AreaFullRange2

        public void AreaRange_ToString_AreaFullRange2()
        {
            Area<string> b = new Area<string>("a", "555");
             Assert.AreEqual<decimal>(0.555m, b.Start);
             Assert.AreEqual<decimal>(0.556m, b.End);
             Assert.AreEqual(b.ToString(), "555");

             Area<string> a = new Area<string>("a", "5550", "5559");
             Assert.AreEqual<decimal>(0.555m, a.Start);
             Assert.AreEqual<decimal>(0.556m, a.End);
             Assert.AreEqual(a.ToString(), "555");
        }
开发者ID:gsimion,项目名称:AreaDestination,代码行数:12,代码来源:RangeTest.cs

示例3: Area_WithSingleDigitStartingWithZeroCanBeCreatedCorrectly

 public void Area_WithSingleDigitStartingWithZeroCanBeCreatedCorrectly()
 {
     Area<string> Area = new Area<string>("A", "01234", "01235");
      Assert.AreEqual<string>("A", Area.Id);
      Assert.AreEqual<string>("01234-01235", Area.ToString());
      Assert.AreEqual<decimal>(0.01234m, Area.Start);
      Assert.AreEqual<decimal>(0.01236m, Area.End);
 }
开发者ID:gsimion,项目名称:AreaDestination,代码行数:8,代码来源:RangeTest.cs

示例4: Area_WithTwoDigitsCanBeCreatedCorrectly

 public void Area_WithTwoDigitsCanBeCreatedCorrectly()
 {
     Area<string> Area = new Area<string>("A", "1234", "1236");
      Assert.AreEqual<string>("A", Area.Id);
      Assert.AreEqual<string>("1234-1236", Area.ToString());
      Assert.AreEqual<decimal>(0.1234m, Area.Start);
      Assert.AreEqual<decimal>(0.1237m, Area.End);
 }
开发者ID:gsimion,项目名称:AreaDestination,代码行数:8,代码来源:RangeTest.cs

示例5: AreaRange_ZeroOne

 public void AreaRange_ZeroOne()
 {
     Area<string> Area = new Area<string>("a", decimal.Zero, decimal.One);
      Assert.AreEqual("a", Area.Id);
      Assert.AreEqual(0m, Area.Start);
      Assert.AreEqual(1m, Area.End);
      Assert.AreEqual<string>("0-9", Area.ToString());
 }
开发者ID:gsimion,项目名称:AreaDestination,代码行数:8,代码来源:RangeTest.cs

示例6: Area_WithSingleDigitCanBeCreatedCorrectly

 public void Area_WithSingleDigitCanBeCreatedCorrectly()
 {
     Area<string> Area = new Area<string>("A", 1234);
      Assert.AreEqual<string>("A", Area.Id);
      Assert.AreEqual<string>("1234", Area.ToString());
      Assert.AreEqual<decimal>(0.1234m, Area.Start);
      Assert.AreEqual<decimal>(0.1235m, Area.End);
 }
开发者ID:gsimion,项目名称:AreaDestination,代码行数:8,代码来源:RangeTest.cs

示例7: AreaRange_ToString_SingleArea

 public void AreaRange_ToString_SingleArea()
 {
     Area<string> a = new Area<string>("a", 923);
      Assert.AreEqual(a.ToString(), "923");
 }
开发者ID:gsimion,项目名称:AreaDestination,代码行数:5,代码来源:RangeTest.cs

示例8: AreaRange_ToString_SingleArea_EndingWithZeros

 public void AreaRange_ToString_SingleArea_EndingWithZeros()
 {
     Area<string> a = new Area<string>("a", "9232200000");
      Assert.AreEqual(a.ToString(), "9232200000");
 }
开发者ID:gsimion,项目名称:AreaDestination,代码行数:5,代码来源:RangeTest.cs

示例9: AreaRange_ToString_AreaRange_StartShorter

 public void AreaRange_ToString_AreaRange_StartShorter()
 {
     Area<string> a = new Area<string>("a", new Decimal(0.23), new Decimal(0.235));
      Assert.AreEqual(a.ToString(), "230-234");
 }
开发者ID:gsimion,项目名称:AreaDestination,代码行数:5,代码来源:RangeTest.cs

示例10: AreaRange_ToString_AreaRange_EndShorter

 public void AreaRange_ToString_AreaRange_EndShorter()
 {
     Area<string> a = new Area<string>("a", new Decimal(0.234), new Decimal(0.26));
      Assert.AreEqual(a.ToString(), "234-259");
 }
开发者ID:gsimion,项目名称:AreaDestination,代码行数:5,代码来源:RangeTest.cs

示例11: AreaRange_ToString_AreaFullRange_EndingWithZeros

 public void AreaRange_ToString_AreaFullRange_EndingWithZeros()
 {
     Area<string> a = new Area<string>("a", "10000000000", "10000000003");
      Assert.AreEqual<decimal>(0.1m, a.Start);
      Assert.AreEqual<decimal>(0.10000000004m, a.End);
      Assert.AreEqual(a.ToString(), "10000000000-10000000003");
 }
开发者ID:gsimion,项目名称:AreaDestination,代码行数:7,代码来源:RangeTest.cs

示例12: MapChange

 public void MapChange(Area area)
 {
     Send("map:change", o => { o.map = area.ToString(); }, MAP_CHANGE_REF);
 }
开发者ID:Darth-Alex,项目名称:client,代码行数:4,代码来源:EntityChannel.cs

示例13: RequestAccessToken

        public bool RequestAccessToken(Area area, string character, out AccessCredentials accessCredentials)
        {
            const string ROUTE = "/api/token/entity";

            return GetToken(ROUTE, new[]
                    {
                                        new KeyValuePair<string, string>("map", area.ToString()),
                                        new KeyValuePair<string, string>("char_name", character)
                                },
                            out accessCredentials);
        }
开发者ID:Darth-Alex,项目名称:client,代码行数:11,代码来源:SecureRestApi.cs


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