Senator Guerra Souty original series calendar,replica hublot blue steel peach pointer collocation of rolex replica Rome digital scale, track type minute replica watches scale shows that the classical model is swiss replica watches incomparable, wearing elegant dress highlights.


YOU ARE HERE: HOME Questions What is difference between out and ref keywords in C NET

out vs ref

View(s): 16678

What is difference between out and ref keywords in C# .NET?

Answer 1)

ref parameter is both input and o/p parameter
out parameter is only output parameter

As ref parameter treated as input parameter too, ref requires that the variable be initialized before being passed; otherwise you will receive compiler error.

As out parameter treated only as output parameter, out arguments need not be initialized prior to being passed, the calling method is required to assign a value before the method returns.

  Asked in:  SemanticSpace Technologies   Expertise Level:  Intermediate
  Last updated on Thursday, 18 August 2011
3/5 stars (12 vote(s))

Register Login Ask Us Write to Us Help