Which classes of the .NET Framework should Hayley use to ensure that the stock details are
available to Sharon at all times? Justify your answer along with reasons
One ofseveral main classes to ensure that the files are available is "File" class from "System.I0"namespace. It contains "bool Exists (stringpath)" method that allows to ensure that the file exists. Itreturns logic value "true" or "false" and takes 1 string
argument with the path to appropriate file.
The nextclass is "FileInfo" from "System.I0" namespace. It also has the same "bool Exists(string path)" method. Thismethod duplicates method from the previous class.
Thedifference is that in the second case you need to createan object of the FileInfo class and then call"Exists" method from created object. In the "File" class
"Exists" method is static. It means that it can be called fromclass name: System.I0.File.Exists(sfring path). So these two classeswould help Hayley to ensure that the stock details are available to Sharon at
all times.
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C#