WCF

WCF Examples

WCF

WCF Projects

WCF Project

adplus-dvertising
Delegates and Data Contracts
Previous Home Next

All delegate definitions are compiled into serializable classes, and so in theory your data contract types could contain delegates as member variables:

[DataContract]
class A
{
   [DataMember]
   public EventHandler ME;
}

or even as events

[DataContract]
class A
{
   [field:DataMember]
   public event EventHandler ME;
}
Data Sets and TablesData

The raw DataSet and DataTable types are serializable, marked with the Serializable attribute:

[Serializable]
public class DataSet : ...
{...}

[Serializable]
public class DataTable : ...
{...}

Type-safe data set and data table

[Serializable]
public partial class Exampleofdataset : DataSet
{
public ContactsDataTable Contacts
{get;}
[Serializable]
public partial class ContactsDataTable : DataTable,IEnumerable
{
public void AddContactsRow(ContactsRow row);
public ContactsRow AddContactsRow(string FirstName,string LastName);
//More members
}
public partial class ContactsRow : DataRow
{
public string FName
{get;set;}
public string LName
{get;set;}
//More members
}
//More members
}
public partial class ContactsTableAdapter : Component
{
public file Exampleofdataset.ContactsDataTable GetData( );
//More members
}
Previous Home Next