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

C#

 
QuestionHi adding data's to datatable, Pin
Hema Bairavan15-Jan-09 5:37
Hema Bairavan15-Jan-09 5:37 
GeneralRe: Hi adding data's to datatable, Pin
nelsonpaixao15-Jan-09 5:56
nelsonpaixao15-Jan-09 5:56 
GeneralRe: Hi adding data's to datatable, Pin
Hema Bairavan15-Jan-09 6:04
Hema Bairavan15-Jan-09 6:04 
GeneralRe: Hi adding data's to datatable, Pin
Henry Minute15-Jan-09 6:43
Henry Minute15-Jan-09 6:43 
GeneralRe: Hi adding data's to datatable, Pin
nelsonpaixao15-Jan-09 15:58
nelsonpaixao15-Jan-09 15:58 
QuestionPhilisophical question Pin
Gary Wheeler15-Jan-09 4:38
Gary Wheeler15-Jan-09 4:38 
AnswerRe: Philisophical question [modified] Pin
Douglas Troy15-Jan-09 5:03
Douglas Troy15-Jan-09 5:03 
GeneralRe: Philisophical question Pin
S. Senthil Kumar16-Jan-09 4:32
S. Senthil Kumar16-Jan-09 4:32 
Douglas Troy wrote:
Using member initialization in this case means that you know your fields are valid, so you won't have issues if finalize is called following failed object construction.


How so?

static class Win32
{
    public static IntPtr OpenHandle() { return IntPtr.Zero; }
    public static void CloseHandle(IntPtr ptr) { }
}

class TestClass
{
    IntPtr h1 = Win32.OpenHandle();

    ~TestClass()
    {
        Win32.CloseHandle(h1);
    }
}


If OpenHandle throws an exception, I would expect the finalizer to still run, with h1 having the default value.

Regards
Senthil [MVP - Visual C#]
_____________________________
My Home Page |My Blog | My Articles | My Flickr | WinMacro

AnswerRe: Philisophical question Pin
#realJSOP15-Jan-09 5:50
professional#realJSOP15-Jan-09 5:50 
AnswerRe: Philisophical question Pin
Scott Dorman15-Jan-09 5:51
professionalScott Dorman15-Jan-09 5:51 
GeneralRe: Philisophical question Pin
carbon_golem15-Jan-09 8:34
carbon_golem15-Jan-09 8:34 
GeneralRe: Philisophical question Pin
Scott Dorman15-Jan-09 8:39
professionalScott Dorman15-Jan-09 8:39 
GeneralRe: Philisophical question Pin
S. Senthil Kumar15-Jan-09 18:28
S. Senthil Kumar15-Jan-09 18:28 
GeneralRe: Philisophical question Pin
carbon_golem16-Jan-09 5:51
carbon_golem16-Jan-09 5:51 
GeneralRe: Philisophical question Pin
S. Senthil Kumar16-Jan-09 6:58
S. Senthil Kumar16-Jan-09 6:58 
GeneralRe: Philisophical question Pin
Gary Wheeler16-Jan-09 0:41
Gary Wheeler16-Jan-09 0:41 
GeneralRe: Philisophical question Pin
Scott Dorman16-Jan-09 3:41
professionalScott Dorman16-Jan-09 3:41 
AnswerRe: Philisophical question Pin
S. Senthil Kumar15-Jan-09 18:39
S. Senthil Kumar15-Jan-09 18:39 
AnswerRe: Philisophical question Pin
Vikram A Punathambekar15-Jan-09 22:03
Vikram A Punathambekar15-Jan-09 22:03 
GeneralRe: Philisophical question Pin
Gary Wheeler16-Jan-09 0:39
Gary Wheeler16-Jan-09 0:39 
GeneralRe: Philisophical question Pin
Vikram A Punathambekar16-Jan-09 1:47
Vikram A Punathambekar16-Jan-09 1:47 
GeneralRe: Philisophical question Pin
Gary Wheeler16-Jan-09 1:52
Gary Wheeler16-Jan-09 1:52 
QuestionSybase Binary Columns [modified] Pin
mobius11100115-Jan-09 4:25
mobius11100115-Jan-09 4:25 
AnswerRe: Sybase Binary Columns [modified] Pin
Dave Kreskowiak15-Jan-09 4:49
mveDave Kreskowiak15-Jan-09 4:49 
GeneralRe: Sybase Binary Columns Pin
mobius11100115-Jan-09 10:09
mobius11100115-Jan-09 10:09 

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.