C# Serializing a Collection of Objects

后端 未结 3 1471
遇见更好的自我
遇见更好的自我 2021-01-07 01:45

I am working on a ASP.NET application that has a class that inherits a List of a Custom Object.

public class UserRoleList : List {
    publ         


        
3条回答
  •  悲&欢浪女
    2021-01-07 02:28

    I believe you really just need to ensure that UserRoleBO is serializable and the list will take care of itself. This assumes the values you want to serialize are public properties on the UserRoleBO and UserList. For more info see What is the point of the ISerializable interface?

提交回复
热议问题