Why does do this code do if(sz !=sz2) sz = sz2 !?!

Posted by acidzombie24 on Stack Overflow See other posts from Stack Overflow or by acidzombie24
Published on 2009-12-20T07:47:07Z Indexed on 2010/05/31 4:32 UTC
Read the original article Hit count: 85

Filed under:
|

For the first time i created a linq to sql classes. I decided to look at the class and found this.

What... why is it doing if(sz !=sz2) { sz = sz2; }. I dont understand. Why isnt the set generated as this._Property1 = value?

	private string _Property1;
	[Column(Storage="_Property1", CanBeNull=false)]
	public string Property1
	{
		get
		{
			return this._Property1;
		}
		set
		{
			if ((this._Property1 != value))
			{
				this._Property1 = value;
			}
		}
	}

© Stack Overflow or respective owner

Related posts about c#

Related posts about linq-to-sql