Home
|
Tutorial
|
Articles
|
Forum
|
Interview Question
|
Code Snippets
|
News
|
Fun Zone
|
Poll
|
Web Links
|
Certification
|
Search
Welcome :
Guest
Sign In
Register
Win Surprise Gifts!!!
Congratulations!!!
Top 5 Contributors of the Month
satyapriyanayak
Narayanan
Karthikeyan Anbarasan
Amit Mehra
Jean Paul
Home
>>
Forum
>>
C#
>>
Post New Question
Subscribe to Forum
use of new() keyword in where function
Posted By:
sds
Posted Date:
July 04, 2012
Points:
5
Category :
C#
Please explain why should we use where,new keyword in function
Responses
Author:
Mohanraj
Company URL:
http://www.dotnetspark.com
Posted Date: July 05, 2012 Points: 20
hi,
New keyword is used as operator and modifier in C#
As operator
it is used as a operator whenever we need to instantiate a new type
whenever a new type is instantiated its corresponding constructor is invoked.
As modifier
it is used to hide an inherited member from the base class member
Author:
Sreeraj Nair Mungath
Company URL:
http://www.dotnetspark.com
Posted Date: July 05, 2012 Points: 20
New is not used just to create objects of a class. It is
also used for Shadowing a method in .NET, which means if
Base class and Derived class have methods with same name
and signature, You can precede the derived class method
name with "new" keyword which makes the method a new one
altogether. This is used in retaining old implementation of
a method and you also want to introduce new implementation
for same method in your assembly
classname a=new classname();
Post Reply
You must
Sign In
To post reply
Related Questions Related Questions
What is the use of this keyword in C sharp?
Internal keyword in C#
crystal report function
how to call a javascript function in dot net code?
how to call the "timer=setTimeout(''functionname()'',1000)" in a function in javascript
Latest Forum Questions From The Same Category
Delete Row and Select Next Record in DatagridView
How to take backup and restore of local database?
How to reduce size of PPT file generated form OpenXML
how to pass parameter
COM object that has been separated from its underlying RCW cannot be used. in C#.net
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Here
Quick Links For Forum Categories:
ASP.Net
Windows Application
.NET Framework
C#
VB.Net
ADO.Net
Sql Server
SharePoint
OOPs
Silverlight
IIS
JQuery
JavaScript/VBScript
Biztalk
WPF
Patten/Practices
WCF
Others
www.DotNetSpark.com
UnAnswered
All
Hall of Fame
Twitter
Terms of Service
Privacy Policy
Contact Us
Archives
Tell A Friend