Click here to Skip to main content
15,884,425 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Using Aero theme in WPF Pin
Pete O'Hanlon6-Oct-09 11:21
mvePete O'Hanlon6-Oct-09 11:21 
Questionhow to use List as a parameter in a call to a web service? Pin
CBenac6-Oct-09 10:57
CBenac6-Oct-09 10:57 
AnswerRe: how to use List as a parameter in a call to a web service? Pin
CBenac6-Oct-09 13:17
CBenac6-Oct-09 13:17 
GeneralRe: how to use List as a parameter in a call to a web service? Pin
VCsamir6-Oct-09 20:16
VCsamir6-Oct-09 20:16 
GeneralRe: how to use List as a parameter in a call to a web service? Pin
CBenac7-Oct-09 3:44
CBenac7-Oct-09 3:44 
GeneralRe: how to use List as a parameter in a call to a web service? Pin
Mark Salsbery7-Oct-09 7:31
Mark Salsbery7-Oct-09 7:31 
GeneralRe: how to use List as a parameter in a call to a web service? Pin
CBenac7-Oct-09 14:10
CBenac7-Oct-09 14:10 
GeneralRe: how to use List as a parameter in a call to a web service? Pin
Mark Salsbery7-Oct-09 15:22
Mark Salsbery7-Oct-09 15:22 
CBenac wrote:
But, it is not all, there is more to be done


I guess I missed the problem then.

You stated "The compiler only accepts it if the List is of type object"...

When I define a service like this:
namespace TestWcfServiceLibrary
{
    [ServiceContract(Namespace = "")]
    public interface ISilverlightService
    {
        [OperationContract]
        void SetPersons(List<Person> personlist);
    }


    public class SilverlightService : ISilverlightService
    {
        public void SetPersons(List<Person> personlist)
        {
        }
    }


    public class Person
    {
        public string name;
        public int age;
    }
}

...I get this generated for the client:
public System.IAsyncResult BeginSetPersons(System.Collections.ObjectModel.ObservableCollection<SilverlightTester.SilverlightServiceReference.Person> personlist, System.AsyncCallback callback, object asyncState) {
    object[] _args = new object[1];
    _args[0] = personlist;
    System.IAsyncResult _result = base.BeginInvoke("SetPersons", _args, callback, asyncState);
    return _result;
}

public void EndSetPersons(System.IAsyncResult result) {
    object[] _args = new object[0];
    base.EndInvoke("SetPersons", _args, result);
}

There shouldn't be any compiler errors using that client side code.

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: how to use List as a parameter in a call to a web service? Pin
CBenac8-Oct-09 6:02
CBenac8-Oct-09 6:02 
GeneralRe: how to use List as a parameter in a call to a web service? Pin
Mark Salsbery8-Oct-09 10:14
Mark Salsbery8-Oct-09 10:14 
GeneralRe: how to use List as a parameter in a call to a web service? Pin
CBenac15-Oct-09 14:15
CBenac15-Oct-09 14:15 
GeneralRe: how to use List as a parameter in a call to a web service? Pin
Mark Salsbery15-Oct-09 14:33
Mark Salsbery15-Oct-09 14:33 
Questionscreen saver issue. It will only disply the last image for some reason [modified] Pin
havegunwilltravel6-Oct-09 1:26
havegunwilltravel6-Oct-09 1:26 
AnswerRe: screen saver issue. It will only disply the last image for some reason Pin
Richard MacCutchan6-Oct-09 3:28
mveRichard MacCutchan6-Oct-09 3:28 
AnswerRe: screen saver issue. It will only disply the last image for some reason Pin
Christian Graus6-Oct-09 10:54
protectorChristian Graus6-Oct-09 10:54 
Questionscreen saver issue. It will only disply the last image for some reason Pin
havegunwilltravel6-Oct-09 1:14
havegunwilltravel6-Oct-09 1:14 
QuestionIs it possible to dynamically change font color on a cell by cell basis on the same row? Pin
Jon_Boy5-Oct-09 8:45
Jon_Boy5-Oct-09 8:45 
AnswerRe: Is it possible to dynamically change font color on a cell by cell basis on the same row? Pin
Pete O'Hanlon5-Oct-09 10:50
mvePete O'Hanlon5-Oct-09 10:50 
GeneralRe: Is it possible to dynamically change font color on a cell by cell basis on the same row? Pin
Jon_Boy6-Oct-09 1:19
Jon_Boy6-Oct-09 1:19 
QuestionSilverlight Vertigo.Slideshow problem Pin
Richard Hudson5-Oct-09 8:34
Richard Hudson5-Oct-09 8:34 
AnswerRe: Silverlight Vertigo.Slideshow problem Pin
Mark Salsbery6-Oct-09 8:21
Mark Salsbery6-Oct-09 8:21 
GeneralRe: Silverlight Vertigo.Slideshow problem Pin
Richard Hudson13-Oct-09 0:25
Richard Hudson13-Oct-09 0:25 
QuestionSpecify path to Icon file in XAML Pin
Etienne_1235-Oct-09 7:24
Etienne_1235-Oct-09 7:24 
AnswerRe: Specify path to Icon file in XAML Pin
Pete O'Hanlon5-Oct-09 10:49
mvePete O'Hanlon5-Oct-09 10:49 
GeneralRe: Specify path to Icon file in XAML Pin
Etienne_1236-Oct-09 3:42
Etienne_1236-Oct-09 3:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.