小编Daw*_*ski的帖子

Microsoft.Spatial和System.Spatial库之间有什么区别

我想知道两个空间库有什么区别 - Microsoft.Spatial和System.Spatial?

当我查看这两个代码时,我看到几乎相同的类.两者都有例如GeographyPoint或Geography抽象类.与那些实施相同.

应该使用哪一个?

要添加更多的上下文 - 我正在使用一些地理空间功能进行Azure搜索.

c# spatial geospatial azure azure-cognitive-search

5
推荐指数
1
解决办法
2196
查看次数

在asp.net中更改img src

所以我的数据库中有一个bool列,表示访问者是否是"Inhouse".如果值是,true我希望img src为:const string checkedIn = "/Images/Icons/Visitor-checkedin-16x16.png";if false,我希望它是另一个src.而且,如果访客尚未访问,"内部"应该是falseAND"预期到期"日期还没有.这是我的代码:

C#:

public string GetImageUrl(string inhouse, DateTime expectedArrival)
{
    const string checkedIn = "/Images/Icons/Visitor-checkedin-16x16.png";
    const string checkedOut = "/Images/Icons/Visitor-checkedout-16x16.png";
    const string notArrived = "/Images/Icons/Visitor-notarrived-16x16.png";

    if (ToBool(inhouse))
    {
        inhouse = checkedIn;
    }

    else if (ToBool(inhouse) == false && expectedArrival.AddDays(0) <= DateTime.Now)
    {
        inhouse = notArrived;
    }

    else
    {
        inhouse = checkedOut;
    }

    return inhouse;
}

private static bool ToBool(string value, bool defaultValue = false)
{
    bool result;
    return …
Run Code Online (Sandbox Code Playgroud)

.net html c# asp.net

0
推荐指数
1
解决办法
1318
查看次数

标签 统计

c# ×2

.net ×1

asp.net ×1

azure ×1

azure-cognitive-search ×1

geospatial ×1

html ×1

spatial ×1