Which of the following code segments will he use to resolve the issue?

Posted by: Pdfprep Category: GSSP-.NET Tags: , ,

Bill works as a Software Developer for SunInfo Inc. He develops an application named SunApplication using C# .NET. The employees of the company use SunApplication for viewing and editing inventory data. SunApplication receives data from a file named MyFile.xml, which currently does not provide any information. Bill decides to write code to get information from the MyFile.xml file.

Which of the following code segments will he use to resolve the issue? Each correct answer represents a complete solution. Choose all that apply.
A . FileInfo FI = new FileInfo(@"c:tempMyFile.xml");
Console.WriteLine("Filename " + F

B . FullName );
Console.WriteLine(" Created at " + F
C . CreationTime );
Console.WriteLine(" Accessed at " + F

D . LastAccessTime );
E . FileInfo FI = new FileInfo ("@c:program filestempMyFile.xml");
Console.WriteLine ("Filename " + F
F . FullName );
Console.WriteLine(" Created at " + F
G . CreationTime );
Console.WriteLine(" Accessed at " + F
H . LastAccessTime );
. FileInfo FI = new FileInfo("MyFile.xml");
Console.WriteLine("Filename " + F
. FullName );
Console.WriteLine(" Created at " + F
. CreationTime );
Console.WriteLine(" Accessed at " + F
. LastAccessTime );
. string str=@"c:windowsMyFile.xml";
FileInfo FI = new FileInfo (str);
F
. Open (FileMode.Open, FileAccess.Read);
Console.WriteLine("Filename " + F
. FullName );
Console.WriteLine(" Created at " + F
. CreationTime );
Console.WriteLine(" Accessed at " + F
. LastAccessTime );

Answer: A,C,D

Leave a Reply

Your email address will not be published.