How to insert a web link?
Out parameters
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > .Net Development > Out parameters 7 March 2007 18:44:25

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

Out parameters

Brady Kelly 7 March 2007 18:44:25
 A short lived question arose in the office on 'out' versus 'ref' parameters.
I thought I'd check with the experts; what is the difference?


===================­================
This list is hosted by DevelopMentor http://www.develop.­com

View archives and manage your subscription(s) at http://discuss.deve­lop.com

Add comment
Peter Ritchie 7 March 2007 18:19:03 permanent link ]
 out are "must-write" and ref are "read/might-write".­

===================­================
This list is hosted by DevelopMentor http://www.develop.­com

View archives and manage your subscription(s) at http://discuss.deve­lop.com

Add comment
Chris Anderson 7 March 2007 18:44:25 permanent link ]
 out params do not need to be initialised before being passed; ref ones do.

i.e. This code is valid:

int i; // Note this has not been initialised
Foo (out i);

This however is invalid:
int i; // Note this has not been initialised
Bar (ref i);

To fix the latter, it must be changed to something like:
int i = 0; // This is now initialised
Bar (ref i);


___________________­_____________

From: Discussion of development on the .NET platform using any managed language on behalf of Brady Kelly
Sent: Wed 07/03/2007 15:30
To: DOTNET-CLR@DISCUSS.­DEVELOP.COM
Subject: [DOTNET-CLR] Out parameters



A short lived question arose in the office on 'out' versus 'ref' parameters.
I thought I'd check with the experts; what is the difference?


===================­================
This list is hosted by DevelopMentor http://www.develop.­com

View archives and manage your subscription(s) at http://discuss.deve­lop.com





===================­================
This list is hosted by DevelopMentor http://www.develop.­com

View archives and manage your subscription(s) at http://discuss.deve­lop.com

Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > .Net Development > Out parameters 7 March 2007 18:44:25

see also:
Re: MySQL denying access to everything…
NULL and empty space
[MySQL] Sometimes I get empty rows from…
пройди тесты:
see also:
Buy or rent from IXC VoIP software…
Softswitch from IXC! 24/7 Support!
Eshjo odna kopija

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .