Geeks With Blogs
Realizing Results my personal notes on C#, SharePoint and object oriented programming August 2010 Entries
Difference between comparisons null!= x and x!=null
Many times we see any of these two different convention used by different programmers for null checks. Even have seen many seasoned java professional who used the first form and argued that X!=null may hit the performance so one should use null!=X, but if you go through the c# language specification there is no such difference as such in both the forms and are translated to x.HasValue during compilation. below is section as explained in CLS From C# language Specification: Section 14.9.9 Equality ......

Posted On Tuesday, August 31, 2010 4:51 PM

Update multichioce field in SharePoint List using C#
below is the code snippet on how to update a field in sharepoint list which contains multiple chioce value using(SPWeb oWebsite = SPContext.Current.Site.AllW... { SPList oList = oWebsite.Lists["listname"]; SPListItem oListItem = oList.Items[0]; oListItem["columnname"] = "choice1;#chioce2;#chioce3" oListItem.Update(); } ......

Posted On Tuesday, August 31, 2010 4:38 PM

Copyright © Manish Sati | Powered by: GeeksWithBlogs.net