Home > Net >  Why Directoryinfo error, "" beginner, ask a superior. Thank you!
Why Directoryinfo error, "" beginner, ask a superior. Thank you!

Time:01-18

using System;
using System.Collections.Generic;
Using System. Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;



The namespace HoverTreeTool. HvtInfo. KeleyiClient
{
Public partial class _Default: System. Web. UI. Page
{
Protected void Page_Load (object sender, EventArgs e)
{
String userAgent=Request. UserAgent==null? "No" : Request. UserAgent;
if (! IsPostBack)
{
String UserIP=Page. Request. UserHostAddress;
String TMPSTR=UserIP. Substring (10, (UserIP. Length - 10));
String UserName;
Response. Write (UserIP);
Response. Write (TMPSTR);
If (int. Parse (TMPSTR) & lt; 10)

{TMPSTR="0" + TMPSTR;
The UserName="VE_ + TMPSTR";


}
The else
{
The UserName="VE_ + TMPSTR";
}


Response. Write (UserName);
String tmppath;

Tmppath="E: \ \ test \ \ WebSite1 \ \ user \ " + UserName;
Response. Write (tmppath);
Directoryinfo tmpusername=new Directoryinfo (tmppath);


Can't find the type or namespace name "directoryinfo (lack of a using directive or assembly references?)


CodePudding user response:

Pay attention to the case, this kind of mistake on the mouse when also can have correct prompt,

CodePudding user response:

reference 1/X - I - n reply:
pay attention to the case, this kind of mistake on the mouse when also can have correct prompt,

Case is tried, are not

CodePudding user response:

reference 1/X - I - n reply:
pay attention to the case, this kind of mistake on the mouse when also can have correct prompt,

Behind the input using System. IO. No hint Directory

CodePudding user response:

  •  Tags:  
  • C#
  • Related