new to C# - Directory.CreateDirectory error?

Hello, I am new to C# and can't seem to figure out why I cannot use Directory.CreateDirectory in the user control code attached.  I have used it many times in VB.

SS
TIA,
Andrew
AhelblingAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AndyAinscowFreelance programmer / ConsultantCommented:
>>I have used it many times in VB.

Have you?  According to that error the SiteInfintyWebApp.UserControls.Directory does not contain a method called CreateDirectory.  (You might have used a different class in VB)
0
AhelblingAuthor Commented:
Ok, I am confused...

using System.IO; allows for use of  Directory.CreateDirectory("TEST");

No?
0
AhelblingAuthor Commented:
so?

System.IO.Directory.CreateDirectory("TEST");
0
AndyAinscowFreelance programmer / ConsultantCommented:
Yes - BUT that isn't what you were using.  Look at the error.  You might need to explicitly use System.IO.Directory.CreateDirectory instead of Directory.CreateDirectory
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.