Okay, I've got some sample code that I'm supposed to be going through to use an example for how to use a product...and I've got this code:
protected void checkout_Click(object sender, EventArgs e)
{
OurWebServiceClient client = new OurWebServiceClient();
this.session = client.BindAccount(ref this.session);
client.FinalizeSession(this.session);
client.Close();
this.checkout.Text = "success";
this.checkout.Enabled = false;
}
So this code is a bit strange to me for various reasons, but the line that stands out to me is the second line in the method:
this.session = client.BindAccount(ref this.session);
It's a ref, so this.session could actually point to a different object after the call. Except then they assign this.session to the value returned from the call, blowing away (as far as I can tell) anything they gained by having it as a ref. And what does it mean to have a ref variable passed into a web service anyway?