Answer the question
In order to leave comments, you need to log in
Store many objects of the same type on disk?
{
"count": 10, //количество элементов
"Event":
[//GameEvent Array
{
"ID": 0,
"Text": "Hello!"
{//EventInfo
"TimeOut": 0
}
}
{
"ID": 1,
"Text": "I keep data."
{
"TimeOut": 42
}
}
//...
]
}
DataContract]
public sealed class GameEvent
{
[DataMember]
public EventInfo EventInfo { get; }
[DataMember]
public string Text { get; }
internal GameEvent(string text, EventInfo ei)
{
Text = text;
EventInfo = ei;
}
internal GameEvent(string text)
: this(text, default(EventInfo))
{ }
}
[DataContract()]
public struct EventInfo
{
[DataMember]
TimeSpan TimeOut;
internal EventInfo(TimeSpan timeOut)
{
TimeOut = timeOut;
}
}
Answer the question
In order to leave comments, you need to log in
Maybe try db? How to create it without installed special programs.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question