How to Create Files by Using the FileInfo Class?



How to Create Files by Using the FileInfo Class?..

Answer / raihansazal

FileInfo fi = new FileInfo("Your file name with directory");
fi.Create();

That's all.

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More C Sharp Code Interview Questions

how does the below eqation proceed to be solved: x*=y+z options: x=x*y+z or x=x*(y+z)

1 Answers  


Write a program to convert postfix expression to infix expression.

0 Answers   Mind Tree,


Coding for Manipulate XML File Data Using C#?

1 Answers  


program to reverse the order of words in a string.

2 Answers   Mind Tree,


Hello Sir, Thanks for the Solution but, can you pls. Explain the coding for the Static Function & static variable from the below coding....waiting for Ans. class fact { public static void Main() { fact f=new fact(); int x=1; //Declaration of x as 1 int k=Convert.ToInt32(Console.ReadLine()); for(int i=1;i<=k;i++) { x= x *i; } System.Console.WriteLine(x); } }

0 Answers  


Code for Reading and writing from a file?

0 Answers   IBM, Xoriant,


How to Create Files by Using the FileInfo Class?

1 Answers  


Coding for using Nullable Types in C#?

1 Answers  


How to find No of classes,Packages,No of Methods per Classes and Depth of Inheritance for selecting source code in windows form application using c# .net? (Source code is input Program. It may be Java or .net) Please help me..) Thanks..)

0 Answers  


Write a program. there are 1..n numbers placed in an array in random fashion with one integer missing. find the missing number.

1 Answers   Infosys, Mind Tree,


program for string reverse(eg:- i am boy -> boy am i)

8 Answers   Black Pepper, Infosys, Mind Tree,


How to Link Different Data Sources Together?

0 Answers  


Categories
  • ASP.NET Code Interview Questions ASP.NET Code (46)
  • VB.NET Code Interview Questions VB.NET Code (9)
  • C Sharp Code Interview Questions C Sharp Code (51)
  • ADO.NET Code Interview Questions ADO.NET Code (8)