I have an xml file sample.xml located in some folder:
<?xml version="1.0"?>
<!-- Please Enter your frequency value between 10sec to 80sec -->
<Time>
<Value>80</Value>
</Time>
this xml file is given to user if any one enters beyond the limit say 8, or 700 it wl send the default value as 80 in the log file(it is windowservice we dont have any UI) otherwise whatever the given one need to display if it is string or alphanumeric it wl send error message to log file.
I need a c# coding in try ,catch block for displaying those things in log files
This is the place means the function they are previously doing means here the value is fixed that time no xml files are there which one(xml file) we need to use for now.
public sampleInterface()
{
// This call is required by the Windows.Forms Component Designer.
InitializeComponent();
//
// NetIqInterface
// ## Heading ##
this.CanHandlePowerEvent = false;
this.CanPauseAndContinue = true;
this.CanShutdown = false;
//
// Initialize static variables
//
etl = new EtlDebug( ProjectInstaller.SERVICE_NAME, "netiq", "NIQTRACES" );
if (outstandingTimers == null) outstandingTimers = new ArrayOfTimers();
//
// Initialize polling timer - set to 80 seconds for now.
//
LeafDebug.DebugTraceNormal( "InitializeComponent", "Set polling timer: 60000ms" );
timer = new System.Timers.Timer( 60000 );
timer.Elapsed += new ElapsedEventHandler( OnTimer );
// The method in the Leaf.Resources instantiates the resource
// manager appropriately to access the resource file.
resources = Managers.LeafStrings;
}