IT Community - Software Programming, Web Development and Technical Support

What's the difference between pointer and delegate?

This is a discussion on What's the difference between pointer and delegate? within the C# Programming forums, part of the Software Development category; What's the difference between pointer and delegate?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > C# Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-23-2007, 06:09 AM
mobilegeek mobilegeek is offline
D-Web Analyst
 
Join Date: Jun 2007
Posts: 205
mobilegeek is on a distinguished road
Question What's the difference between pointer and delegate?

What's the difference between pointer and delegate?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-23-2007, 06:10 AM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Default Re: What's the difference between pointer and delegate?

A pointer is the address of the variable whereas Delegate is allows passing method of class to object of other class

Rules in Delegation:-

1. In order to create a Delegate a Signature (parameter) must match Signature of object.

2. Define all the methods which has the same Signature as Delegate define.

3. Create the delegate object & pass the method as a parameter to Delegate.

4. Now call the encapsulated method using delegated object.

The best example of Delegation model is ADO.NET Architecture & Event Handling in windows environment.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
pointer concept in C vigneshgets C and C++ Programming 1 08-14-2007 01:03 AM
What pointer type is used to implement the heterogeneous linked list in C? sundarraja C and C++ Programming 1 08-02-2007 11:16 PM
Smart Pointer sundarraja C and C++ Programming 1 07-25-2007 06:06 AM
What is the Object pointer in Java? mobilegeek Java Programming 1 07-23-2007 06:08 AM
Why pointer can't use in Java vadivelanvaidyanathan Java Programming 4 07-16-2007 11:23 PM


All times are GMT -7. The time now is 11:18 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0