using System;
using System.Runtime.InteropServices;

namespace Sasa.QualityTools.DrFx.Tests.Violation.CSharp.Microsoft.Design
{
    public static class Rule1060
    {
        public static int FindWindow()
        {
            IntPtr ptr = FindWindow("foo", "bar");
            return ptr.ToInt32();
        }

        // このメソッドは CA1060 に違反しています。
        [DllImport("user32.dll", CharSet = CharSet.Unicode)]
        private static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
    }
}
