HI everyone,
I need to clone an IEnumerator because the original one gets "consumed" after it's used.
I found a C# Example in this thread(Ben Maddow answer): http://stackoverflow.com/questions/...erablet-instance-saving-a-copy-of-the-iterati
So I implemeted it this way:
Clone an IEnumerator
I need to clone an IEnumerator because the original one gets "consumed" after it's used.
I found a C# Example in this thread(Ben Maddow answer): http://stackoverflow.com/questions/...erablet-instance-saving-a-copy-of-the-iterati
So I implemeted it this way:
Code (CSharp):
- public static T Clone<T>(T source) where T : class, IEnumerator
- {
- var sourceType = source.GetType().UnderlyingSystemType;
- var...