@@ -658,7 +658,8 @@ When a value object is returned from a method or property, you cannot use that o
658
658
ClientContext context = new ClientContext (" http://SiteUrl" );
659
659
660
660
Web web = context .Web ;
661
- ListCreationInformation creationInfo = new ListCreationInformation ();
661
+ ListCreationInformation creationInfo = new ListCreationInformation ();
662
+ creationInfo .TemplateType = (int )ListTemplateType .Announcements ;
662
663
creationInfo .Description = web .Title ;
663
664
creationInfo .Title = web .Title ;
664
665
List newList = web .Lists .Add (creationInfo );
@@ -676,11 +677,12 @@ ClientContext context = new ClientContext("http://SiteUrl");
676
677
677
678
Web web = context .Web ;
678
679
679
- context .Load (web , w => w .Title );
680
+ context .Load (web , w => w .Title , w => w . Description );
680
681
681
682
context .ExecuteQuery ();
682
683
683
- ListCreationInformation creationInfo = new ListCreationInformation ();
684
+ ListCreationInformation creationInfo = new ListCreationInformation ();
685
+ creationInfo .TemplateType = (int )ListTemplateType .Announcements ;
684
686
creationInfo .Description = web .Description ;
685
687
creationInfo .Title = web .Title ;
686
688
SP .List newList = web .Lists .Add (creationInfo );
@@ -694,7 +696,7 @@ context.ExecuteQuery();
694
696
The difference is the following three lines:
695
697
696
698
``` csharp
697
- context .Load (web , w => w .Title );
699
+ context .Load (web , w => w .Title , w => w . Description );
698
700
context .ExecuteQuery ();
699
701
.. .
700
702
context .ExecuteQuery ();
0 commit comments