Click here to Skip to main content
15,917,709 members
Home / Discussions / C#
   

C#

 
GeneralGUI Pin
G_ULJEE14-Dec-03 20:59
G_ULJEE14-Dec-03 20:59 
GeneralGDI+ Graphics.DrawRectangle() Pin
krisp14-Dec-03 20:33
krisp14-Dec-03 20:33 
GeneralRe: Drawing rectangles in GDI+ Pin
Arun Reginald Zaheeruddin14-Dec-03 23:28
Arun Reginald Zaheeruddin14-Dec-03 23:28 
GeneralWBEM not WMI Pin
WayneMJ14-Dec-03 18:42
WayneMJ14-Dec-03 18:42 
GeneralGet Folder Attributes Pin
Daniel Negron14-Dec-03 14:57
Daniel Negron14-Dec-03 14:57 
GeneralRe: Get Folder Attributes Pin
Rampas Tomas14-Dec-03 20:57
Rampas Tomas14-Dec-03 20:57 
GeneralHelp Regarding Image Transfer Pin
Ali Gohar14-Dec-03 9:24
sussAli Gohar14-Dec-03 9:24 
GeneralRe: Help Regarding Image Transfer Pin
Heath Stewart15-Dec-03 4:18
protectorHeath Stewart15-Dec-03 4:18 
Are you closing both the input and output streams after each file? It's possible that you're using the maximum amount of remote, open file handles (not sure about this, though). A good way to develop your IO code is to use a try-catch-finally block like so:
Stream inStream = null;
String outStream = null;
try
{
  inStream = open image file;
  outStream = create output image file;
  // Transfer
}
catch (Exception e)
{
  // Do any exception handling and either stop transferring the
  // rest of the files, or continue to the next one.
}
finally
{
  if (inStream != null) inStream.Close();
  if (outStream != null)
  {
    outStream.Flush();
    outStream.Close();
  }
}
The finally block is always executed - even if you return (or transfer control out of your block another way) from your try or catch block. The only time the finally block is NOT executed is when you use Environment.Exit, which unloads the CLR unconditionally.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralHeath - Further External Drag Drop Questions Pin
Tristan Rhodes14-Dec-03 6:42
Tristan Rhodes14-Dec-03 6:42 
GeneralRe: Heath - Further External Drag Drop Questions Pin
Nick Parker14-Dec-03 7:22
protectorNick Parker14-Dec-03 7:22 
GeneralRe: Heath - Further External Drag Drop Questions Pin
Tristan Rhodes14-Dec-03 12:10
Tristan Rhodes14-Dec-03 12:10 
GeneralRe: Heath - Further External Drag Drop Questions Pin
Heath Stewart15-Dec-03 4:13
protectorHeath Stewart15-Dec-03 4:13 
GeneralRe: Heath - Further External Drag Drop Questions Pin
Tristan Rhodes15-Dec-03 6:59
Tristan Rhodes15-Dec-03 6:59 
GeneralRe: Heath - Further External Drag Drop Questions Pin
Heath Stewart15-Dec-03 8:27
protectorHeath Stewart15-Dec-03 8:27 
GeneralRe: Heath - Further External Drag Drop Questions Pin
Tristan Rhodes15-Dec-03 8:58
Tristan Rhodes15-Dec-03 8:58 
GeneralRe: Heath - Further External Drag Drop Questions Pin
Heath Stewart15-Dec-03 9:00
protectorHeath Stewart15-Dec-03 9:00 
GeneralRe: Heath - Further External Drag Drop Questions Pin
Tristan Rhodes15-Dec-03 10:15
Tristan Rhodes15-Dec-03 10:15 
GeneralRe: Heath - Further External Drag Drop Questions Pin
J. Dunlap15-Dec-03 11:11
J. Dunlap15-Dec-03 11:11 
GeneralNever mind... Pin
J. Dunlap15-Dec-03 11:14
J. Dunlap15-Dec-03 11:14 
GeneralRe: Never mind... Pin
Tristan Rhodes15-Dec-03 11:16
Tristan Rhodes15-Dec-03 11:16 
GeneralRe: Never mind... Pin
Tristan Rhodes15-Dec-03 11:33
Tristan Rhodes15-Dec-03 11:33 
GeneralRe: Never mind... Pin
J. Dunlap15-Dec-03 11:43
J. Dunlap15-Dec-03 11:43 
GeneralRe: Never mind... Pin
Tristan Rhodes15-Dec-03 11:52
Tristan Rhodes15-Dec-03 11:52 
GeneralRe: Never mind... Pin
J. Dunlap15-Dec-03 11:46
J. Dunlap15-Dec-03 11:46 
GeneralRe: Heath - Further External Drag Drop Questions Pin
Heath Stewart15-Dec-03 11:23
protectorHeath Stewart15-Dec-03 11:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.