C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » .NET Framework »

Difference b/w 'Dim obj as Emp' and Dim obj as New Emp


Posted Date: 28 Sep 2004    Resource Type: Articles    Category: .NET Framework
Author: kavitha chowdharyMember Level: Silver    
Rating: 1 out of 5Points: 3



what is the difference between these two statements
Statement ! : Dim obj as Emp
Statement 2 : Dim obj as New Emp
Emp is a Class with some member variables and member functions.

Dim obj as Emp :
This Statement dosen't allocate memory.It just creates a pointer on stack It osen't have address to work on memory since functions and data r available on stack.

Dim obj as New Emp :
This Statement allocates memory on heap.'obj' works as pointer when it accesses the functions on stack.These functions work on the data available on heap.



Responses

Author: Ravi Makwana    30 Sep 2004Member Level: Bronze   Points : 0
A nice exlanation which every programmer working on OOPs concepts should know as a basic knowledge.


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Singleton Class.
Previous Resource: Calling Com Components from .Net Application
Return to Discussion Resource Index
Post New Resource
Category: .NET Framework


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use