c# - creating a new folder with todays date on specific folder -


i trying create new folder todays date on specific given path:

string localdirectory = directory.createdirectory(     datetime.now.tostring("i:\\test\\final test\\snaps\\dd-mm-yyyy"));  

but receive error:

cannot implicitly convert type 'system.io.directoryinfo' 'string'

as per the documentation directory.createdirectory, createdirectory returns directoryinfo object, not string.

so this:

directoryinfo localdirectory = directory.createdirectory(... 

or this:

var localdirectory = directory.createdirectory(... 

(which same thing)


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -