Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange Error
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Divers
Thread ID:
01437935
Message ID:
01437944
Vues:
37
Done. No change.


>As a first step try adding the [Serializable] attribute to the Address class
>
>>I have multiple projects in my WinForms solution.
>>
>>I have a class called Address in a project called DataAccess. This class has properties for each field in the address table. In the project WorkIT I have a user control called crlAddress that is the UI to the Address class.
>>
>>When I try to drag the crlAddress control into the crlCustomer control, I get the following:
>>
>>
>>Failed to create component 'crlAddresses'.  The error message follows:
>>
>> 'System.Runtime.Serialization.SerializationException: Type 'Marois.WorkIT.DataAccess.Address' in Assembly 'DataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
>>
>>   at System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type)
>>
>>   at System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context)
>>
>>   at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo()
>>
>>   at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter)
>>
>>   at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter)
>>
>>   at System.Runtime.Serialization.Formatters.Bina...'
>>
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform