创建WebRequest字符串的最简单方法

时间:2014-08-15 09:49:06

标签: c# httpwebrequest

我确定前几天我看到一个班级为WebRequest创建一个字符串,但我现在找不到它......

我到目前为止:

private string httpRequest
        {
            get { return "http://www.AWebSite.com"; }
        }

    private string _requestString;
    public string RequestString
    {
        get { return _requestString; }
        set { _requestString = value; }
    }

    public Request()
    {
        RequestString = httpRequest;
    }

    private void UpdateRequestString(MyObj myObject)
    {
        RequestString= string.Format("{0}&someParameters={1},{2}", RequestString, myObject.first, myObject.second);
    }

这显然很好。但我确定我看到了一种更简单的方法吗?

0 个答案:

没有答案
相关问题