@表示字符串中的转义符按字面意思处理。@"C:\dell\drivers\R105155\DevInst.dll"
等于
"C:\\dell\\drivers\\R105155\\DevInst.dll"

解决方案 »

  1.   

    @"Line1
    Line2
    Line3"
    等于
    "Line1\r\nLine2\r\nLine3"
      

  2.   

    那么如何转成"C:\\dell\\drivers\\R105155\\DevInst.dll"这种形式?
      

  3.   

    干吗要去啊,如果要获取路径很简单的:
    filepath = filepath .substring(0,filepath.lastindexof('\\')+1 )好像是这么写,自己看看,思路就是获取DevInst.dll前的路径
      

  4.   

    System.Reflection.Assembly assem = System.Reflection.Assembly.LoadFile(filepath);
    在这里如果filepath是"@"C:\dell\drivers\R105155\DevInst.dll"程序就不对啊,换成""C:\\dell\\drivers\\R105155\\DevInst.dll""就对了,请问怎么办?
    "
      

  5.   

    "@"C:\dell\drivers\R105155\DevInst.dll"是"OpenFileDialog ofd = new OpenFileDialog(); 
    string filepath = ofd.FileName ;"得到的啊,可是在"System.Reflection.Assembly assem = System.Reflection.Assembly.LoadFile(filepath); "里用不了.这怎么解决?
      

  6.   

    OpenFileDialog ofd = new OpenFileDialog(); 
    string filepath = ofd.FileName ; 
    filepath 是 "@"C:\dell\drivers\R105155\DevInst.dll"" 
    应该是@"C:\dell\drivers\R105155\DevInst.dll" @不应该在“”里面啊~请问@符合为何用,如何去掉?
      

  7.   

    这里的@符号 是一个转意符;
    因为在.net的编程语言中不允许单独的\号出现;不信你试下;
    .net 在文件操作的时候就采用了@作为 标识的意思;
    在.net 中 "\\" 实际上它的值 为"\"; 第一个"\"用来转意; 第而个才是真正的值; 
      

  8.   

    @"C:\dell\drivers\R105155\DevInst.dll""C:/dell/drivers/R105155/DevInst.dll"
      

  9.   

    lz是否加载dll,然后反射啊,把代码贴出来啊,大家看看