<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Scripts and Programming &#187; functions</title>
	<atom:link href="http://www.egscript.info/category/functions/feed" rel="self" type="application/rss+xml" />
	<link>http://www.egscript.info</link>
	<description>Everything about scripts and programming</description>
	<lastBuildDate>Wed, 07 Apr 2010 17:29:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Trouble with error</title>
		<link>http://www.egscript.info/2010/03/18/trouble-with-error-3.html</link>
		<comments>http://www.egscript.info/2010/03/18/trouble-with-error-3.html#comments</comments>
		<pubDate>Thu, 18 Mar 2010 20:03:12 +0000</pubDate>
		<dc:creator>kishore</dc:creator>
				<category><![CDATA[27765]]></category>
		<category><![CDATA[8790]]></category>
		<category><![CDATA[8810]]></category>
		<category><![CDATA[Example Programs]]></category>
		<category><![CDATA[Hackers]]></category>
		<category><![CDATA[functions]]></category>

		<guid isPermaLink="false">http://www.egscript.info/2010/03/18/trouble-with-error-3.html</guid>
		<description><![CDATA[Hi,
I am taking a class in C# and ran into a problem that I can&#8217;t figure out.  I get an error that states: Cannot convert type &#8216;int&#8217; to type &#8216;bool&#8217;.  Below is the code I am working with.  The error is on line 54.  I am using Visual studio 2008 Professional.
// [...]]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
I am taking a class in C# and ran into a problem that I can&#8217;t figure out.  I get an error that states: Cannot convert type &#8216;int&#8217; to type &#8216;bool&#8217;.  Below is the code I am working with.  The error is on line 54.  I am using Visual studio 2008 Professional.</p>
<p>// Parking Garage Project &#8211; Randy Meister OOPI</p>
<p>using System;</p>
<p>public class ParkGarage<br />
{<br />
   //Declare and initiate variables<br />
   string vehicleCode;<br />
   int minutesParked = 0;<br />
   int customerAge = 0;</p>
<p>
   //get and set vehicle code<br />
   public string VehicleCode<br />
   {<br />
      get<br />
      {<br />
         return vehicleCode;<br />
      }<br />
      set<br />
      {<br />
         vehicleCode = value;<br />
      }<br />
   }</p>
<p>   //get and set minutesparked<br />
   public int MinutesParked<br />
   {<br />
      get<br />
      {<br />
         return minutesParked;<br />
      }<br />
      set<br />
      {<br />
         minutesParked = value;<br />
      }<br />
   }</p>
<p>   //get and set customerAge<br />
   public int CustomerAge<br />
   {<br />
      get<br />
      {<br />
         return customerAge;<br />
      }<br />
      set<br />
      {<br />
         customerAge = value;<br />
      }<br />
   }<br />
   public void CalculateCharges()<br />
   {<br />
      int hours = minutesParked / 60;<br />
      if (minutesParked % 60)    THIS IS THE LINE THE ERROR APPEARS.<br />
         hours++;</p>
<p>      int a3hours = hours &#8211; 2;<br />
      int a10hours = hours &#8211; 5;<br />
      int a4hours = hours &#8211; 2;<br />
      int a8hours = hours &#8211; 4;</p>
<p>      double charges = 0.0;</p>
<p>      //Prompt user to enter vehicle code<br />
      Console.Write(&quot;Enter Vehicle Code:&quot;);<br />
      vehicleCode = Convert.ToString(Console.ReadLine());</p>
<p>      Console.Write(&quot;Enter Minutes Parked:&quot;);<br />
      minutesParked = Convert.ToInt32(Console.ReadLine());</p>
<p>      Console.Write(&quot;Enter Customer&#8217;s Age:&quot;);<br />
      customerAge = Convert.ToInt32(Console.ReadLine());</p>
<p>      switch (vehicleCode.ToUpper())<br />
      {<br />
         case &quot;C&quot;:<br />
            if (hours &lt;= 2)<br />
               charges = hours * 2.50;<br />
            else if (hours &lt;= 5)<br />
               charges = 5.00 + (a3hours * .75);<br />
            else if (hours &lt;= 15)<br />
               charges = 7.25 + (a10hours * .50);<br />
            break;</p>
<p>         case &quot;T&quot;:<br />
            if (hours &lt;= 2)<br />
               charges = hours * 3.75;<br />
            else if (hours &lt;= 4)<br />
               charges = 7.50 + (a4hours * 1.50);<br />
            else if (hours &lt;= 16)<br />
               charges = 10.50 + (a8hours * .75);<br />
            break;</p>
<p>         case &quot;M&quot;:<br />
            if (hours &lt;= 2)<br />
               charges = hours * 1.00;<br />
            else if (hours &lt;= 5)<br />
               charges = 2.00 + (a3hours * .50);<br />
            else if (hours &lt;= 15)<br />
               charges = 3.50 + (a10hours * .25);<br />
            break;</p>
<p>         default:<br />
            Console.WriteLine(&quot;Please Enter A Valid Choice.&quot;);<br />
            break;</p>
<p>            if (customerAge &gt;= 62)<br />
               charges = charges * .50;</p>
<p>      } // end switch</p>
<p>      // Print Receipt<br />
      Console.WriteLine(&quot;Thank You For Parking With Us!&quot;);<br />
      Console.WriteLine(&quot;\nVehicle Code: {0}&quot;, vehicleCode);<br />
      Console.WriteLine(&quot;\nTotal Hours Parked: {0}&quot;, hours);<br />
      Console.WriteLine(&quot;\nTotal Charges: {0}&quot;, charges);</p>
<p>   } // end method calculate charges</p>
<p>} // end class ParkGarage</p></div>
<p><a href="http://www.codeguru.com/forum/external.php?type=RSS2">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.egscript.info/2010/03/18/trouble-with-error-3.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trouble with error</title>
		<link>http://www.egscript.info/2010/03/18/trouble-with-error-3.html</link>
		<comments>http://www.egscript.info/2010/03/18/trouble-with-error-3.html#comments</comments>
		<pubDate>Thu, 18 Mar 2010 20:03:12 +0000</pubDate>
		<dc:creator>kishore</dc:creator>
				<category><![CDATA[27765]]></category>
		<category><![CDATA[8790]]></category>
		<category><![CDATA[8810]]></category>
		<category><![CDATA[Example Programs]]></category>
		<category><![CDATA[Hackers]]></category>
		<category><![CDATA[functions]]></category>

		<guid isPermaLink="false">http://www.egscript.info/2010/03/18/trouble-with-error-3.html</guid>
		<description><![CDATA[Hi,
I am taking a class in C# and ran into a problem that I can&#8217;t figure out.  I get an error that states: Cannot convert type &#8216;int&#8217; to type &#8216;bool&#8217;.  Below is the code I am working with.  The error is on line 54.  I am using Visual studio 2008 Professional.
// [...]]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
I am taking a class in C# and ran into a problem that I can&#8217;t figure out.  I get an error that states: Cannot convert type &#8216;int&#8217; to type &#8216;bool&#8217;.  Below is the code I am working with.  The error is on line 54.  I am using Visual studio 2008 Professional.</p>
<p>// Parking Garage Project &#8211; Randy Meister OOPI</p>
<p>using System;</p>
<p>public class ParkGarage<br />
{<br />
   //Declare and initiate variables<br />
   string vehicleCode;<br />
   int minutesParked = 0;<br />
   int customerAge = 0;</p>
<p>
   //get and set vehicle code<br />
   public string VehicleCode<br />
   {<br />
      get<br />
      {<br />
         return vehicleCode;<br />
      }<br />
      set<br />
      {<br />
         vehicleCode = value;<br />
      }<br />
   }</p>
<p>   //get and set minutesparked<br />
   public int MinutesParked<br />
   {<br />
      get<br />
      {<br />
         return minutesParked;<br />
      }<br />
      set<br />
      {<br />
         minutesParked = value;<br />
      }<br />
   }</p>
<p>   //get and set customerAge<br />
   public int CustomerAge<br />
   {<br />
      get<br />
      {<br />
         return customerAge;<br />
      }<br />
      set<br />
      {<br />
         customerAge = value;<br />
      }<br />
   }<br />
   public void CalculateCharges()<br />
   {<br />
      int hours = minutesParked / 60;<br />
      if (minutesParked % 60)    THIS IS THE LINE THE ERROR APPEARS.<br />
         hours++;</p>
<p>      int a3hours = hours &#8211; 2;<br />
      int a10hours = hours &#8211; 5;<br />
      int a4hours = hours &#8211; 2;<br />
      int a8hours = hours &#8211; 4;</p>
<p>      double charges = 0.0;</p>
<p>      //Prompt user to enter vehicle code<br />
      Console.Write(&quot;Enter Vehicle Code:&quot;);<br />
      vehicleCode = Convert.ToString(Console.ReadLine());</p>
<p>      Console.Write(&quot;Enter Minutes Parked:&quot;);<br />
      minutesParked = Convert.ToInt32(Console.ReadLine());</p>
<p>      Console.Write(&quot;Enter Customer&#8217;s Age:&quot;);<br />
      customerAge = Convert.ToInt32(Console.ReadLine());</p>
<p>      switch (vehicleCode.ToUpper())<br />
      {<br />
         case &quot;C&quot;:<br />
            if (hours &lt;= 2)<br />
               charges = hours * 2.50;<br />
            else if (hours &lt;= 5)<br />
               charges = 5.00 + (a3hours * .75);<br />
            else if (hours &lt;= 15)<br />
               charges = 7.25 + (a10hours * .50);<br />
            break;</p>
<p>         case &quot;T&quot;:<br />
            if (hours &lt;= 2)<br />
               charges = hours * 3.75;<br />
            else if (hours &lt;= 4)<br />
               charges = 7.50 + (a4hours * 1.50);<br />
            else if (hours &lt;= 16)<br />
               charges = 10.50 + (a8hours * .75);<br />
            break;</p>
<p>         case &quot;M&quot;:<br />
            if (hours &lt;= 2)<br />
               charges = hours * 1.00;<br />
            else if (hours &lt;= 5)<br />
               charges = 2.00 + (a3hours * .50);<br />
            else if (hours &lt;= 15)<br />
               charges = 3.50 + (a10hours * .25);<br />
            break;</p>
<p>         default:<br />
            Console.WriteLine(&quot;Please Enter A Valid Choice.&quot;);<br />
            break;</p>
<p>            if (customerAge &gt;= 62)<br />
               charges = charges * .50;</p>
<p>      } // end switch</p>
<p>      // Print Receipt<br />
      Console.WriteLine(&quot;Thank You For Parking With Us!&quot;);<br />
      Console.WriteLine(&quot;\nVehicle Code: {0}&quot;, vehicleCode);<br />
      Console.WriteLine(&quot;\nTotal Hours Parked: {0}&quot;, hours);<br />
      Console.WriteLine(&quot;\nTotal Charges: {0}&quot;, charges);</p>
<p>   } // end method calculate charges</p>
<p>} // end class ParkGarage</p></div>
<p><a href="http://www.codeguru.com/forum/external.php?type=RSS2">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.egscript.info/2010/03/18/trouble-with-error-3.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trouble with error</title>
		<link>http://www.egscript.info/2010/03/18/trouble-with-error-2.html</link>
		<comments>http://www.egscript.info/2010/03/18/trouble-with-error-2.html#comments</comments>
		<pubDate>Thu, 18 Mar 2010 20:02:57 +0000</pubDate>
		<dc:creator>kishore</dc:creator>
				<category><![CDATA[27765]]></category>
		<category><![CDATA[8790]]></category>
		<category><![CDATA[8810]]></category>
		<category><![CDATA[Example Programs]]></category>
		<category><![CDATA[Hackers]]></category>
		<category><![CDATA[functions]]></category>

		<guid isPermaLink="false">http://www.egscript.info/2010/03/18/trouble-with-error-2.html</guid>
		<description><![CDATA[Hi,
I am taking a class in C# and ran into a problem that I can&#8217;t figure out.  I get an error that states: Cannot convert type &#8216;int&#8217; to type &#8216;bool&#8217;.  Below is the code I am working with.  The error is on line 54.  I am using Visual studio 2008 Professional.
// [...]]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
I am taking a class in C# and ran into a problem that I can&#8217;t figure out.  I get an error that states: Cannot convert type &#8216;int&#8217; to type &#8216;bool&#8217;.  Below is the code I am working with.  The error is on line 54.  I am using Visual studio 2008 Professional.</p>
<p>// Parking Garage Project &#8211; Randy Meister OOPI</p>
<p>using System;</p>
<p>public class ParkGarage<br />
{<br />
   //Declare and initiate variables<br />
   string vehicleCode;<br />
   int minutesParked = 0;<br />
   int customerAge = 0;</p>
<p>
   //get and set vehicle code<br />
   public string VehicleCode<br />
   {<br />
      get<br />
      {<br />
         return vehicleCode;<br />
      }<br />
      set<br />
      {<br />
         vehicleCode = value;<br />
      }<br />
   }</p>
<p>   //get and set minutesparked<br />
   public int MinutesParked<br />
   {<br />
      get<br />
      {<br />
         return minutesParked;<br />
      }<br />
      set<br />
      {<br />
         minutesParked = value;<br />
      }<br />
   }</p>
<p>   //get and set customerAge<br />
   public int CustomerAge<br />
   {<br />
      get<br />
      {<br />
         return customerAge;<br />
      }<br />
      set<br />
      {<br />
         customerAge = value;<br />
      }<br />
   }<br />
   public void CalculateCharges()<br />
   {<br />
      int hours = minutesParked / 60;<br />
      if (minutesParked % 60)    THIS IS THE LINE THE ERROR APPEARS.<br />
         hours++;</p>
<p>      int a3hours = hours &#8211; 2;<br />
      int a10hours = hours &#8211; 5;<br />
      int a4hours = hours &#8211; 2;<br />
      int a8hours = hours &#8211; 4;</p>
<p>      double charges = 0.0;</p>
<p>      //Prompt user to enter vehicle code<br />
      Console.Write(&quot;Enter Vehicle Code:&quot;);<br />
      vehicleCode = Convert.ToString(Console.ReadLine());</p>
<p>      Console.Write(&quot;Enter Minutes Parked:&quot;);<br />
      minutesParked = Convert.ToInt32(Console.ReadLine());</p>
<p>      Console.Write(&quot;Enter Customer&#8217;s Age:&quot;);<br />
      customerAge = Convert.ToInt32(Console.ReadLine());</p>
<p>      switch (vehicleCode.ToUpper())<br />
      {<br />
         case &quot;C&quot;:<br />
            if (hours &lt;= 2)<br />
               charges = hours * 2.50;<br />
            else if (hours &lt;= 5)<br />
               charges = 5.00 + (a3hours * .75);<br />
            else if (hours &lt;= 15)<br />
               charges = 7.25 + (a10hours * .50);<br />
            break;</p>
<p>         case &quot;T&quot;:<br />
            if (hours &lt;= 2)<br />
               charges = hours * 3.75;<br />
            else if (hours &lt;= 4)<br />
               charges = 7.50 + (a4hours * 1.50);<br />
            else if (hours &lt;= 16)<br />
               charges = 10.50 + (a8hours * .75);<br />
            break;</p>
<p>         case &quot;M&quot;:<br />
            if (hours &lt;= 2)<br />
               charges = hours * 1.00;<br />
            else if (hours &lt;= 5)<br />
               charges = 2.00 + (a3hours * .50);<br />
            else if (hours &lt;= 15)<br />
               charges = 3.50 + (a10hours * .25);<br />
            break;</p>
<p>         default:<br />
            Console.WriteLine(&quot;Please Enter A Valid Choice.&quot;);<br />
            break;</p>
<p>            if (customerAge &gt;= 62)<br />
               charges = charges * .50;</p>
<p>      } // end switch</p>
<p>      // Print Receipt<br />
      Console.WriteLine(&quot;Thank You For Parking With Us!&quot;);<br />
      Console.WriteLine(&quot;\nVehicle Code: {0}&quot;, vehicleCode);<br />
      Console.WriteLine(&quot;\nTotal Hours Parked: {0}&quot;, hours);<br />
      Console.WriteLine(&quot;\nTotal Charges: {0}&quot;, charges);</p>
<p>   } // end method calculate charges</p>
<p>} // end class ParkGarage</p></div>
<p><a href="http://www.codeguru.com/forum/external.php?type=RSS2">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.egscript.info/2010/03/18/trouble-with-error-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Save multiple files</title>
		<link>http://www.egscript.info/2010/03/18/save-multiple-files-3.html</link>
		<comments>http://www.egscript.info/2010/03/18/save-multiple-files-3.html#comments</comments>
		<pubDate>Thu, 18 Mar 2010 20:02:18 +0000</pubDate>
		<dc:creator>kishore</dc:creator>
				<category><![CDATA[27765]]></category>
		<category><![CDATA[8790]]></category>
		<category><![CDATA[8810]]></category>
		<category><![CDATA[Example Programs]]></category>
		<category><![CDATA[Hackers]]></category>
		<category><![CDATA[functions]]></category>

		<guid isPermaLink="false">http://www.egscript.info/2010/03/18/save-multiple-files-3.html</guid>
		<description><![CDATA[Hello,
I&#8217;m new to C# and need some quick assistance&#8230;
I have code that currently overwrites the latest modified file, and what I WANT it to do is to save the last 5 modified files before deleting the oldest one (for backup purposes), like first in, first out.  It only saves the current file on the [...]]]></description>
			<content:encoded><![CDATA[<div>Hello,</p>
<p>I&#8217;m new to C# and need some quick assistance&#8230;</p>
<p>I have code that currently overwrites the latest modified file, and what I WANT it to do is to save the last 5 modified files before deleting the oldest one (for backup purposes), like first in, first out.  It only saves the current file on the device, as seen below:</p>
<p>rapi.CopyFileFromDevice(&quot;file.sdf&quot;, @&quot;\Programs\Application\file.sdf&quot;, true);<br />
rapi.CopyFileOnDevice@&quot;\Programs\Application\file.sdf&quot;, @&quot;\Programs\Application\file_2.sdf&quot;, true);</p>
<p>&#8230;..</p>
<p>rapi.CopyFileToDevice(&quot;file.sdf&quot;, @&quot;\Programs\Application\file.sdf&quot;, true);<br />
                rapi.Disconnect();<br />
                rapi.Dispose();</p>
<p>
I didn&#8217;t include all the code, but can if needed.  Thanks in advance for any help.</div>
<p><a href="http://www.codeguru.com/forum/external.php?type=RSS2">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.egscript.info/2010/03/18/save-multiple-files-3.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trouble with error</title>
		<link>http://www.egscript.info/2010/03/18/trouble-with-error.html</link>
		<comments>http://www.egscript.info/2010/03/18/trouble-with-error.html#comments</comments>
		<pubDate>Thu, 18 Mar 2010 20:02:02 +0000</pubDate>
		<dc:creator>kishore</dc:creator>
				<category><![CDATA[27765]]></category>
		<category><![CDATA[8790]]></category>
		<category><![CDATA[8810]]></category>
		<category><![CDATA[Example Programs]]></category>
		<category><![CDATA[Hackers]]></category>
		<category><![CDATA[functions]]></category>

		<guid isPermaLink="false">http://www.egscript.info/2010/03/18/trouble-with-error.html</guid>
		<description><![CDATA[Hi,
I am taking a class in C# and ran into a problem that I can&#8217;t figure out.  I get an error that states: Cannot convert type &#8216;int&#8217; to type &#8216;bool&#8217;.  Below is the code I am working with.  The error is on line 54.  I am using Visual studio 2008 Professional.
// [...]]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
I am taking a class in C# and ran into a problem that I can&#8217;t figure out.  I get an error that states: Cannot convert type &#8216;int&#8217; to type &#8216;bool&#8217;.  Below is the code I am working with.  The error is on line 54.  I am using Visual studio 2008 Professional.</p>
<p>// Parking Garage Project &#8211; Randy Meister OOPI</p>
<p>using System;</p>
<p>public class ParkGarage<br />
{<br />
   //Declare and initiate variables<br />
   string vehicleCode;<br />
   int minutesParked = 0;<br />
   int customerAge = 0;</p>
<p>
   //get and set vehicle code<br />
   public string VehicleCode<br />
   {<br />
      get<br />
      {<br />
         return vehicleCode;<br />
      }<br />
      set<br />
      {<br />
         vehicleCode = value;<br />
      }<br />
   }</p>
<p>   //get and set minutesparked<br />
   public int MinutesParked<br />
   {<br />
      get<br />
      {<br />
         return minutesParked;<br />
      }<br />
      set<br />
      {<br />
         minutesParked = value;<br />
      }<br />
   }</p>
<p>   //get and set customerAge<br />
   public int CustomerAge<br />
   {<br />
      get<br />
      {<br />
         return customerAge;<br />
      }<br />
      set<br />
      {<br />
         customerAge = value;<br />
      }<br />
   }<br />
   public void CalculateCharges()<br />
   {<br />
      int hours = minutesParked / 60;<br />
      if (minutesParked % 60)    THIS IS THE LINE THE ERROR APPEARS.<br />
         hours++;</p>
<p>      int a3hours = hours &#8211; 2;<br />
      int a10hours = hours &#8211; 5;<br />
      int a4hours = hours &#8211; 2;<br />
      int a8hours = hours &#8211; 4;</p>
<p>      double charges = 0.0;</p>
<p>      //Prompt user to enter vehicle code<br />
      Console.Write(&quot;Enter Vehicle Code:&quot;);<br />
      vehicleCode = Convert.ToString(Console.ReadLine());</p>
<p>      Console.Write(&quot;Enter Minutes Parked:&quot;);<br />
      minutesParked = Convert.ToInt32(Console.ReadLine());</p>
<p>      Console.Write(&quot;Enter Customer&#8217;s Age:&quot;);<br />
      customerAge = Convert.ToInt32(Console.ReadLine());</p>
<p>      switch (vehicleCode.ToUpper())<br />
      {<br />
         case &quot;C&quot;:<br />
            if (hours &lt;= 2)<br />
               charges = hours * 2.50;<br />
            else if (hours &lt;= 5)<br />
               charges = 5.00 + (a3hours * .75);<br />
            else if (hours &lt;= 15)<br />
               charges = 7.25 + (a10hours * .50);<br />
            break;</p>
<p>         case &quot;T&quot;:<br />
            if (hours &lt;= 2)<br />
               charges = hours * 3.75;<br />
            else if (hours &lt;= 4)<br />
               charges = 7.50 + (a4hours * 1.50);<br />
            else if (hours &lt;= 16)<br />
               charges = 10.50 + (a8hours * .75);<br />
            break;</p>
<p>         case &quot;M&quot;:<br />
            if (hours &lt;= 2)<br />
               charges = hours * 1.00;<br />
            else if (hours &lt;= 5)<br />
               charges = 2.00 + (a3hours * .50);<br />
            else if (hours &lt;= 15)<br />
               charges = 3.50 + (a10hours * .25);<br />
            break;</p>
<p>         default:<br />
            Console.WriteLine(&quot;Please Enter A Valid Choice.&quot;);<br />
            break;</p>
<p>            if (customerAge &gt;= 62)<br />
               charges = charges * .50;</p>
<p>      } // end switch</p>
<p>      // Print Receipt<br />
      Console.WriteLine(&quot;Thank You For Parking With Us!&quot;);<br />
      Console.WriteLine(&quot;\nVehicle Code: {0}&quot;, vehicleCode);<br />
      Console.WriteLine(&quot;\nTotal Hours Parked: {0}&quot;, hours);<br />
      Console.WriteLine(&quot;\nTotal Charges: {0}&quot;, charges);</p>
<p>   } // end method calculate charges</p>
<p>} // end class ParkGarage</p></div>
<p><a href="http://www.codeguru.com/forum/external.php?type=RSS2">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.egscript.info/2010/03/18/trouble-with-error.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Save multiple files</title>
		<link>http://www.egscript.info/2010/03/18/save-multiple-files-2.html</link>
		<comments>http://www.egscript.info/2010/03/18/save-multiple-files-2.html#comments</comments>
		<pubDate>Thu, 18 Mar 2010 20:01:58 +0000</pubDate>
		<dc:creator>kishore</dc:creator>
				<category><![CDATA[27765]]></category>
		<category><![CDATA[8790]]></category>
		<category><![CDATA[8810]]></category>
		<category><![CDATA[Example Programs]]></category>
		<category><![CDATA[Hackers]]></category>
		<category><![CDATA[functions]]></category>

		<guid isPermaLink="false">http://www.egscript.info/2010/03/18/save-multiple-files-2.html</guid>
		<description><![CDATA[Hello,
I&#8217;m new to C# and need some quick assistance&#8230;
I have code that currently overwrites the latest modified file, and what I WANT it to do is to save the last 5 modified files before deleting the oldest one (for backup purposes), like first in, first out.  It only saves the current file on the [...]]]></description>
			<content:encoded><![CDATA[<div>Hello,</p>
<p>I&#8217;m new to C# and need some quick assistance&#8230;</p>
<p>I have code that currently overwrites the latest modified file, and what I WANT it to do is to save the last 5 modified files before deleting the oldest one (for backup purposes), like first in, first out.  It only saves the current file on the device, as seen below:</p>
<p>rapi.CopyFileFromDevice(&quot;file.sdf&quot;, @&quot;\Programs\Application\file.sdf&quot;, true);<br />
rapi.CopyFileOnDevice@&quot;\Programs\Application\file.sdf&quot;, @&quot;\Programs\Application\file_2.sdf&quot;, true);</p>
<p>&#8230;..</p>
<p>rapi.CopyFileToDevice(&quot;file.sdf&quot;, @&quot;\Programs\Application\file.sdf&quot;, true);<br />
                rapi.Disconnect();<br />
                rapi.Dispose();</p>
<p>
I didn&#8217;t include all the code, but can if needed.  Thanks in advance for any help.</div>
<p><a href="http://www.codeguru.com/forum/external.php?type=RSS2">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.egscript.info/2010/03/18/save-multiple-files-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Save multiple files</title>
		<link>http://www.egscript.info/2010/03/18/save-multiple-files.html</link>
		<comments>http://www.egscript.info/2010/03/18/save-multiple-files.html#comments</comments>
		<pubDate>Thu, 18 Mar 2010 20:01:43 +0000</pubDate>
		<dc:creator>kishore</dc:creator>
				<category><![CDATA[27765]]></category>
		<category><![CDATA[8790]]></category>
		<category><![CDATA[8810]]></category>
		<category><![CDATA[Example Programs]]></category>
		<category><![CDATA[Hackers]]></category>
		<category><![CDATA[functions]]></category>

		<guid isPermaLink="false">http://www.egscript.info/2010/03/18/save-multiple-files.html</guid>
		<description><![CDATA[Hello,
I&#8217;m new to C# and need some quick assistance&#8230;
I have code that currently overwrites the latest modified file, and what I WANT it to do is to save the last 5 modified files before deleting the oldest one (for backup purposes), like first in, first out.  It only saves the current file on the [...]]]></description>
			<content:encoded><![CDATA[<div>Hello,</p>
<p>I&#8217;m new to C# and need some quick assistance&#8230;</p>
<p>I have code that currently overwrites the latest modified file, and what I WANT it to do is to save the last 5 modified files before deleting the oldest one (for backup purposes), like first in, first out.  It only saves the current file on the device, as seen below:</p>
<p>rapi.CopyFileFromDevice(&quot;file.sdf&quot;, @&quot;\Programs\Application\file.sdf&quot;, true);<br />
rapi.CopyFileOnDevice@&quot;\Programs\Application\file.sdf&quot;, @&quot;\Programs\Application\file_2.sdf&quot;, true);</p>
<p>&#8230;..</p>
<p>rapi.CopyFileToDevice(&quot;file.sdf&quot;, @&quot;\Programs\Application\file.sdf&quot;, true);<br />
                rapi.Disconnect();<br />
                rapi.Dispose();</p>
<p>
I didn&#8217;t include all the code, but can if needed.  Thanks in advance for any help.</div>
<p><a href="http://www.codeguru.com/forum/external.php?type=RSS2">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.egscript.info/2010/03/18/save-multiple-files.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Link DateTime and Date Fields</title>
		<link>http://www.egscript.info/2010/03/18/link-datetime-and-date-fields-2.html</link>
		<comments>http://www.egscript.info/2010/03/18/link-datetime-and-date-fields-2.html#comments</comments>
		<pubDate>Thu, 18 Mar 2010 20:01:43 +0000</pubDate>
		<dc:creator>kishore</dc:creator>
				<category><![CDATA[27765]]></category>
		<category><![CDATA[8790]]></category>
		<category><![CDATA[8810]]></category>
		<category><![CDATA[Example Programs]]></category>
		<category><![CDATA[Hackers]]></category>
		<category><![CDATA[functions]]></category>

		<guid isPermaLink="false">http://www.egscript.info/2010/03/18/link-datetime-and-date-fields-2.html</guid>
		<description><![CDATA[Hello,
I&#8217;m trying to create a report in CR8.5 using two different fields from two different databases.  One field (Hospital_CenDate) is a date field while the other one (Hospital_TranDate) is a date-time field.  Of course, when I link them I get no records presumably because the fields are not the same.  I&#8217;ll admit [...]]]></description>
			<content:encoded><![CDATA[<div>Hello,</p>
<p>I&#8217;m trying to create a report in CR8.5 using two different fields from two different databases.  One field (Hospital_CenDate) is a date field while the other one (Hospital_TranDate) is a date-time field.  Of course, when I link them I get no records presumably because the fields are not the same.  I&#8217;ll admit that I&#8217;m very new to this, so may need a lot of help.  Here&#8217;s what I have so far:</p>
<p>SELECT<br />
    HOSPITAL_CENSUS.&quot;ACCTNO&quot;, HOSPITAL_CENSUS.&quot;CENDATE&quot;, HOSPITAL_CENSUS.&quot;ROOM&quot;, HOSPITAL_CENSUS.&quot;NURSEUNIT&quot;<br />
FROM<br />
    &quot;PATIENT&quot;.&quot;HOSPITAL_CENSUS&quot; HOSPITAL_CENSUS<br />
    &quot;PATIENT&quot;.&quot;HOSPITAL_TRANS&quot; HOSPITAL_TRANS<br />
WHERE<br />
    HOSPITAL_CENSUS.&quot;CENDATE&quot; = HOSPITAL_TRANS.&quot;TRANDATE&quot;<br />
    HOSPITAL_CENSUS.&quot;ACCTNO&quot; = &#8216;123456789&#8242;</p>
<p>Thanks in advance,<br />
AT</div>
<p><a href="http://www.codeguru.com/forum/external.php?type=RSS2">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.egscript.info/2010/03/18/link-datetime-and-date-fields-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Link DateTime and Date Fields</title>
		<link>http://www.egscript.info/2010/03/18/link-datetime-and-date-fields.html</link>
		<comments>http://www.egscript.info/2010/03/18/link-datetime-and-date-fields.html#comments</comments>
		<pubDate>Thu, 18 Mar 2010 20:01:04 +0000</pubDate>
		<dc:creator>kishore</dc:creator>
				<category><![CDATA[27765]]></category>
		<category><![CDATA[8790]]></category>
		<category><![CDATA[8810]]></category>
		<category><![CDATA[Example Programs]]></category>
		<category><![CDATA[Hackers]]></category>
		<category><![CDATA[functions]]></category>

		<guid isPermaLink="false">http://www.egscript.info/2010/03/18/link-datetime-and-date-fields.html</guid>
		<description><![CDATA[Hello,
I&#8217;m trying to create a report in CR8.5 using two different fields from two different databases.  One field (Hospital_CenDate) is a date field while the other one (Hospital_TranDate) is a date-time field.  Of course, when I link them I get no records presumably because the fields are not the same.  I&#8217;ll admit [...]]]></description>
			<content:encoded><![CDATA[<div>Hello,</p>
<p>I&#8217;m trying to create a report in CR8.5 using two different fields from two different databases.  One field (Hospital_CenDate) is a date field while the other one (Hospital_TranDate) is a date-time field.  Of course, when I link them I get no records presumably because the fields are not the same.  I&#8217;ll admit that I&#8217;m very new to this, so may need a lot of help.  Here&#8217;s what I have so far:</p>
<p>SELECT<br />
    HOSPITAL_CENSUS.&quot;ACCTNO&quot;, HOSPITAL_CENSUS.&quot;CENDATE&quot;, HOSPITAL_CENSUS.&quot;ROOM&quot;, HOSPITAL_CENSUS.&quot;NURSEUNIT&quot;<br />
FROM<br />
    &quot;PATIENT&quot;.&quot;HOSPITAL_CENSUS&quot; HOSPITAL_CENSUS<br />
    &quot;PATIENT&quot;.&quot;HOSPITAL_TRANS&quot; HOSPITAL_TRANS<br />
WHERE<br />
    HOSPITAL_CENSUS.&quot;CENDATE&quot; = HOSPITAL_TRANS.&quot;TRANDATE&quot;<br />
    HOSPITAL_CENSUS.&quot;ACCTNO&quot; = &#8216;123456789&#8242;</p>
<p>Thanks in advance,<br />
AT</div>
<p><a href="http://www.codeguru.com/forum/external.php?type=RSS2">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.egscript.info/2010/03/18/link-datetime-and-date-fields.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How do I: C# class for database</title>
		<link>http://www.egscript.info/2010/03/18/how-do-i-c-class-for-database-2.html</link>
		<comments>http://www.egscript.info/2010/03/18/how-do-i-c-class-for-database-2.html#comments</comments>
		<pubDate>Thu, 18 Mar 2010 20:00:58 +0000</pubDate>
		<dc:creator>kishore</dc:creator>
				<category><![CDATA[27765]]></category>
		<category><![CDATA[8790]]></category>
		<category><![CDATA[8810]]></category>
		<category><![CDATA[Example Programs]]></category>
		<category><![CDATA[Hackers]]></category>
		<category><![CDATA[functions]]></category>

		<guid isPermaLink="false">http://www.egscript.info/2010/03/18/how-do-i-c-class-for-database-2.html</guid>
		<description><![CDATA[Hello:
I have some code that I would like to create a class for it. Below is some of my code. I hope I am posting correctly, its my first time here.
Main program:
	Currently I have this to call the connection:
        private void buttonDBConnect_Click(object sender, EventArgs e)
    [...]]]></description>
			<content:encoded><![CDATA[<div>Hello:</p>
<p>I have some code that I would like to create a class for it. Below is some of my code. I hope I am posting correctly, its my first time here.</p>
<p>Main program:<br />
	Currently I have this to call the connection:<br />
        private void buttonDBConnect_Click(object sender, EventArgs e)<br />
        {</p>
<p>            DBServer = textBoxProfileServer.Text;<br />
            DBDatabase = textBoxProfileDatabase.Text;<br />
            DBLogin_ID = textBoxProfileLogin_ID.Text;<br />
            DBPassword = textBoxProfilePassword.Text;<br />
            //<br />
            ClassDB.Connection(DBServer, DBDatabase, DBLogin_ID, DBPassword);<br />
        }</p>
<p>	This fills my dataGrid:<br />
        private void buttonLoadGrid_Click(object sender, EventArgs e)<br />
        {<br />
            DBCommand =<br />
                &quot; SELECT&quot;<br />
                + &quot; [Name]&quot;<br />
                + &quot; ,[Address_1]&quot;<br />
                + &quot; FROM&quot;<br />
                + &quot; [Company]&quot;<br />
                ;<br />
            ClassDB.Select(DBCommand);<br />
            //<br />
            SqlDataAdapter DBDataAdapter = new SqlDataAdapter(ClassDB.DBSelect, ClassDB.DBConnect);<br />
            DataSet DBDataSet = new DataSet();<br />
            DBDataAdapter.Fill(DBDataSet); <br />
            //<br />
            dataGridViewGrid.DataSource = DBDataSet.Tables[0];<br />
            dataGridViewGrid.Refresh();<br />
        }</p>
<p>Class:<br />
	This does the connection:<br />
        public static void Connection(string DBServer, string DBDatabase, string DBLogin_ID, string DBPassword)<br />
        {<br />
            //MessageBox.Show(&quot;DBClass: Connection&quot;);<br />
            DBConnect = <br />
                @&quot;Server=&quot; + DBServer + &quot;;&quot;<br />
                + &quot;Database=&quot; + DBDatabase + &quot;;&quot;<br />
                + &quot;User ID=&quot; + DBLogin_ID + &quot;;&quot;<br />
                + &quot;Password=&quot; + DBPassword + &quot;;&quot;;<br />
            //MessageBox.Show(&quot;DBConnect: With:&quot; + DBConnect);<br />
            //<br />
            try<br />
            {<br />
                //MessageBox.Show(&quot;TRY&#8230;&quot;);<br />
                SqlConnection DBConnection = new SqlConnection();<br />
                DBConnection.ConnectionString = DBConnect;<br />
                DBConnection.Open();<br />
                DBConnection.GetSchema();<br />
            }<br />
            catch<br />
            {<br />
                //MessageBox.Show(&quot;CATCH&#8230;&quot;);<br />
            }<br />
            finally<br />
            {<br />
                //MessageBox.Show(&quot;FINALLY&#8230;&quot;);<br />
            }<br />
        }</p>
<p>//////////////////////////////////////////////////////////////////////////////////////////////////</p>
<p>What I would like to do is to call my DBClass.LoadGrid. By calling it like this: DBClass.LoadGrid(DBCommand);<br />
This is what I have in my DBClass.LoadGrid now. What should I have in it?</p>
<p>        public static void LoadGrid(string DBCommand)<br />
        {<br />
            //MessageBox.Show(&quot;DBLoadGrid: With:&quot; + DBCommand);<br />
            //<br />
            try<br />
            {<br />
                //MessageBox.Show(&quot;TRY&#8230;&quot;);<br />
                DBLoadGrid = DBCommand;<br />
            }<br />
            catch<br />
            {<br />
                //MessageBox.Show(&quot;CATCH&#8230;&quot;);<br />
            }<br />
            finally<br />
            {<br />
                //MessageBox.Show(&quot;FINALLY&#8230;&quot;);<br />
            }<br />
        }</div>
<p><a href="http://www.codeguru.com/forum/external.php?type=RSS2">Go to Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.egscript.info/2010/03/18/how-do-i-c-class-for-database-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->