Jump to content

Site Offline

The community is currently offline and only accessible to those with permission.

Sadikhov IT Certification forums
Sign in to follow this  

Need help on this piece of code, what is occurring in the following pi

Recommended Posts

public static ExportState Load( DirectoryInfo diTempFolder ) {

XmlSerializer xsSerializer = null;

StreamReader srReader = null;

FileInfo fi = null;

ExportState state = null;

try {

if( diTempFolder != null ) {

if( !diTempFolder.Exists ) {



fi = new FileInfo( Path.Combine( diTempFolder.FullName, Constants.FNAME_EXPORT_STATE ) );

xsSerializer = new XmlSerializer( typeof( ExportState ) );

srReader = new StreamReader( fi.FullName, System.Text.Encoding.UTF8 );

state = (ExportState)xsSerializer.Deserialize( srReader );

state.TempDirectory = diTempFolder;


return state;

} finally {

if( srReader != null ) {





Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this