Avatar of Andrew
Andrew
Flag for United States of America asked on

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
.NET Programming

Avatar of undefined
Last Comment
AndyAinscow

8/22/2022 - Mon
AndyAinscow

>>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)
Andrew

ASKER
Ok, I am confused...

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

No?
Andrew

ASKER
so?

System.IO.Directory.CreateDirectory("TEST");
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
ASKER CERTIFIED SOLUTION
AndyAinscow

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.