Buy Questpond's video subscriptions on
huge discount
.
Online: 2099
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Forums
>
C#
>
Loading ...
Equivalent for with keyword in C#
Posted by
Nishithraj
under
C#
on 2/28/2010 | Views : 5749 | Status :
[Member]
| Replies : 4
Write New Post
|
Search Forums
|
Resolved Posts
|
Un Answered Posts
|
Forums Home
Is there any keyword equivalent to "with" keyword in C#
Mark this as answer, if it is.....
With regards
Nishithraj Narayanan
Reply
|
Reply with Attachment
Alert Moderator
Responses
Posted by:
Vuyiswamb
on: 2/28/2010
[Member]
[MVP]
[Administrator]
NotApplicable
0
Good Evening Nishithraj
i dont think there is one. But C# has some cool shortcuts too.
Thank you for posting at Dotnetfunda
Vuyiswa Maseko
Thank you for posting at Dotnetfunda
[Administrator]
Nishithraj
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Raja
on: 2/28/2010
[Member]
Starter
0
Hi Vuyiswa,
Thanks for responding to this post. However, just wanted to tell you one thing, the statement you have written "But C# has some cool shortcuts too" looks very generic and that may not help Nishith in any way, instead it would have been better if you would have given some details about those shortcuts that is available in C# that might have helped him.
Please do not mind, this is just my feeling.
Regards
Regards,
Raja, USA
Nishithraj
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Raja
on: 2/28/2010
[Member]
Starter
0
Sorry, once again :)
Vuyiswa is right there is not one equivalent in C#. Following post will tell you why it is not and help you to get some alternatives.
http://forums.asp.net/p/61373/61373.aspx
http://bytes.com/topic/c-sharp/answers/236554-equivalent-c
Thank you.
Regards,
Raja, USA
Nishithraj
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Gttejas
on: 3/18/2010
[Member]
Starter
0
Hi,
From C# 3.0, there is one new feature called Object initializer will do something like this.
For example,
lets say i have one class
class test
{
public int id {get;set;};
public string name {get;set;};
}
now,
public static void main()
{
// here i can write something like this which is somewhat similar to with syntax
test a=new test()
{
id=10,
name="tejas"
}
}
Nishithraj
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Login to post response
Latest Posts
How to get the exact property name while getting error
(0)
PDB file is not showing Line Number in dot net application hosted on server
(0)
Both Strings morethan 5 letters in length end of the words one vowel and one consonent is different
(0)
how to check Any adjacent letters transposed between two strings(ex: JOHN, JHON)
(1)
can't receive data after success login ?
(1)
Implement Multi-Tenant in Azure Logic Apps
(0)
Why ASP.Net Core 7.0 Web API showing as Connection refused?
(0)
Iterating over columns of dataframe and print as rows in Python Django
(0)
More ...