Results 1 to 4 of 4

Thread: [Resolved] Casting Reference Types

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    1,276

    Resolved [Resolved] Casting Reference Types

    Consider:
    Code:
    Control c = new Control();
    object o = (object)c;
    Control x = (Control)o;
    and:
    Code:
    Control c = new Control();
    object o = c as object;
    Control x = o as Control;
    Is either method preferable and if so why?
    Last edited by wey97; Oct 20th, 2006 at 07:29 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width