using System;
using System.Collections;
+using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using System.Security;
{
IntPtr handle = GetHandle (rkey);
StringBuilder buffer = new StringBuilder (BufferMaxLength);
- ArrayList keys = new ArrayList ();
+ var keys = new List<string> ();
for (int index = 0; true; index ++) {
int result = RegEnumKey (handle, index, buffer, buffer.Capacity);
// should not be here!
GenerateException (result);
}
- return (string []) keys.ToArray (typeof(String));
+ return keys.ToArray ();
}
public string [] GetValueNames (RegistryKey rkey)
{
IntPtr handle = GetHandle (rkey);
- ArrayList values = new ArrayList ();
+ var values = new List<string> ();
for (int index = 0; true; index ++)
{
GenerateException (result);
}
- return (string []) values.ToArray (typeof(String));
+ return values.ToArray ();
}
/// <summary>