Click here to Skip to main content
15,886,584 members
Home / Discussions / C#
   

C#

 
GeneralRemoving objects in a game Pin
Anthony Mushrow5-May-05 23:31
professionalAnthony Mushrow5-May-05 23:31 
GeneralRe: Removing objects in a game Pin
«_Superman_»5-May-05 23:43
professional«_Superman_»5-May-05 23:43 
GeneralPasswords And MainFrames Pin
Anonymous5-May-05 23:28
Anonymous5-May-05 23:28 
GeneralRe: Passwords And MainFrames Pin
ChesterPoindexter6-May-05 3:20
professionalChesterPoindexter6-May-05 3:20 
GeneralAutomatic shutting down of windows xp Pin
G_Zola5-May-05 22:53
G_Zola5-May-05 22:53 
GeneralRe: Automatic shutting down of windows xp Pin
Dan_P5-May-05 23:14
Dan_P5-May-05 23:14 
QuestionIs it possible to force a using-block for a class? Pin
Uwe Keim5-May-05 20:26
sitebuilderUwe Keim5-May-05 20:26 
AnswerRe: Is it possible to force a using-block for a class? Pin
James T. Johnson5-May-05 21:14
James T. Johnson5-May-05 21:14 
AFAIK it isn't possible without some sort of code injecting/inspecting tool.

FXCop might have something like this already built in. And I know there is a free tool out there now for post compilation code injection, but I cannot remember the name of it now.

Beyond that, you could cheat the system a little bit and throw an exception from the Finalizer; just make sure your Dispose method calls GC.SuppressFinalize. If the Dispose method is never called on your object the exception thrown from the finalizer would alert them at some point in time about it..You would only want to do this in a debug build and probably need to capture a stack trace in the constructor so your exception thrown during Finalize can pin-point which object is causing the exception.

James
GeneralRe: Is it possible to force a using-block for a class? Pin
Uwe Keim5-May-05 21:27
sitebuilderUwe Keim5-May-05 21:27 
GeneralRe: Is it possible to force a using-block for a class? Pin
Nish Nishant6-May-05 0:06
sitebuilderNish Nishant6-May-05 0:06 
GeneralRe: Is it possible to force a using-block for a class? Pin
Uwe Keim6-May-05 1:05
sitebuilderUwe Keim6-May-05 1:05 
GeneralRe: Is it possible to force a using-block for a class? Pin
Nish Nishant6-May-05 2:16
sitebuilderNish Nishant6-May-05 2:16 
GeneralRe: Is it possible to force a using-block for a class? Pin
S. Senthil Kumar6-May-05 4:55
S. Senthil Kumar6-May-05 4:55 
GeneralConverting Objects Pin
cab35-May-05 19:49
cab35-May-05 19:49 
GeneralRe: Converting Objects Pin
Mathew Hall6-May-05 1:51
Mathew Hall6-May-05 1:51 
GeneralRe: Converting Objects Pin
cab36-May-05 5:32
cab36-May-05 5:32 
Generalusb interfacing using c#.Net Pin
ahsan1415-May-05 19:19
ahsan1415-May-05 19:19 
GeneralRe: usb interfacing using c#.Net Pin
Kayess Tech5-May-05 20:14
professionalKayess Tech5-May-05 20:14 
GeneralTwo problems about image processing in Pocket PC Pin
redleafong5-May-05 18:33
redleafong5-May-05 18:33 
GeneralRe: Two problems about image processing in Pocket PC Pin
Andrew Kirillov5-May-05 18:48
Andrew Kirillov5-May-05 18:48 
Generalclipping video using DirectShow in C# Pin
5-May-05 18:28
suss5-May-05 18:28 
GeneralDataGrid Cell Edit Pin
Kayess Tech5-May-05 18:16
professionalKayess Tech5-May-05 18:16 
GeneralRe: DataGrid Cell Edit Pin
Polis Pilavas6-May-05 0:32
Polis Pilavas6-May-05 0:32 
GeneralRe: DataGrid Cell Edit Pin
Kayess Tech6-May-05 0:34
professionalKayess Tech6-May-05 0:34 
GeneralRe: DataGrid Cell Edit Pin
Polis Pilavas6-May-05 1:15
Polis Pilavas6-May-05 1:15 

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.