c# - Second path fragment must not be a drive or UNC name - Create Subdirectory Error -


i have exception in third line ofthis code "second path fragment must not drive or unc name"

directoryinfo labdi = new directoryinfo(back.mainfolderpath + @"\news\l"); directoryinfo tld = new directoryinfo(labdi.fullname + @"\" + nora.sn.labl[i]); tld = labdi.createsubdirectory(labdi.fullname + @"\" + nora.sn.labl[i] + @"\"); 

there no useful way on web. thank you.:!

i ran 1 today , tracked down.

the exception trying tell when directoryinfo takes path argument (e.g., createsubdirectory or getfiles), object if path argument contains root , throw elusive exception.

so path arguments contain "c:\" or "d:\" etc not work. armed context, exception message makes bit of sense.

in code, using fullname property , string contains "c:\" or whatever root is.

given age of question, should add c#, .net 4.5, vs2013.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -