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

Write a program to input an integer and - display the reverse - display the sum of each digit - should include logic that considers the input number as any number of digits long

2 Answers   Mind Tree,


working with arrays

1 Answers  


Code for Reading and writing from a file?

0 Answers   IBM, Xoriant,


Give the code for Handling Mouse Events?

0 Answers  


IS Array list is generic or non generic

1 Answers  


Coding for using Nullable Types in C#?

1 Answers  


c# coding for a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors not using the Big-integer and Exponential Function's.

1 Answers   TCS,


Code for Searching for Multiple Matches with the MatchCollection Class?

0 Answers   TCS,


Write a program which has a function and that function should take 2 or 3 or any number of strings and it should return the largest common prefix of all those strings. If there is no common prefix it should return an empty string. for eg:- INPUT OUTPUT glo {glory,glorious,glod} gl {glad,glow} {calendar,phone} empty string

2 Answers   Mind Tree,


c# code to Count number of 1's in a given range of integer (0 to n)

0 Answers  


Can you declare an array of mixed Types?

1 Answers   HCL,


Write a program to count the number of characters, number of words, number of line in file.

2 Answers   Mind Tree,


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)