小编Raj*_*aja的帖子

理解代码

了解大约200K LOC的C#代码库的最佳方法是什么?有没有可用的工具?

http://www.program-comprehension.org/为此目的,似乎有很长一段时间的事件.

谢谢.

c# maintenance list-comprehension

7
推荐指数
1
解决办法
865
查看次数

2020 年 12 月之后 Flex/Flash 应用程序会发生什么变化?

我了解 Adob​​e 将在 2020 年 12 月停止支持 Flash。所有主要浏览器也可能会在 2020 年 12 月之后停止支持。我有一个 Adob​​e Flex/Flash 应用程序,目前正在使用中。考虑到上述事件,我有哪些选择?

apache-flex flash adobe flex3 flex4

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

c#中的超小型Web服务器

我正在编写一个用于教育目的的超小型Web服务器.

对于以下代码,如果我请求包含图像的html页面,我无法在浏览器中看到该图像.我究竟做错了什么?

static void Main(string[] args)
{
    TcpListener listener = new TcpListener(9999);
    listener.Start();
    while (true)
    { 
        TcpClient client = listener.AcceptTcpClient();
        string request = GetRequest(client.GetStream(),
            client.ReceiveBufferSize);
        WriteOutput(request, client.GetStream());
        client.Close();
    }
}

static void WriteOutput(string request, NetworkStream output)
{
    try
    {
        string[] reqs = request.Split(' ');
        WriteOutputHelper(output, reqs[1].Substring(1));
    }
    catch (Exception)
    {
        WriteOutputHelper(output, "404.html");
    }
}

private static void WriteOutputHelper(NetworkStream output, string file)
{
    byte[] statusLine = (new System.Text.ASCIIEncoding()).
        GetBytes(GetStatusLine(file) + "\r\n\r\n");
    output.Write(statusLine, 0, statusLine.Length);
    byte[] ContentType = 
        (new System.Text.ASCIIEncoding()).GetBytes(GetContentType(file) + 
            "\r\n\r\n"); …
Run Code Online (Sandbox Code Playgroud)

c# http http-headers

3
推荐指数
2
解决办法
2892
查看次数

为什么我需要通过引用交换函数来传递字符串?

在C#中,string是引用类型.然后,

为什么我需要让我的交换函数具有ref参数?

swap(ref string first, ref string second) //swap(string first, string second) doesn't work
{
     temp = first;
     first = second
     second = temp;
}
Run Code Online (Sandbox Code Playgroud)

.net c# string value-type reference-type

3
推荐指数
1
解决办法
1505
查看次数