Question : C# Enumerate IE

I'm trying to convert this VB code below to C# can someone help me? I'm trying to enumerate through IE windows find the specified URL and grab the specified elementy by id.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
Private Sub CheckWindow()
        Dim ie As InternetExplorer
        Dim shellWins As New ShellWindows

        For Each ie In shellWins
            If ie.LocationURL = "http://www.google.com" Then
                MsgBox("IE Found")
                WebBrowser1.Document.GetElementById("test").GetAttribute("value")
            End If
        Next
    End Sub

Answer : C# Enumerate IE

Hi find the below c# code....

private void CheckWindow()
{
    InternetExplorer ie = default(InternetExplorer);
    ShellWindows shellWins = new ShellWindows();
   
    foreach (var ie in shellWins) {
        if (ie.LocationURL == "http://www.google.com") {
            Interaction.MsgBox("IE Found");
            WebBrowser1.Document.GetElementById("test").GetAttribute("value");
        }
    }
}

I used the link

http://www.developerfusion.com/tools/convert/vb-to-csharp/

to convert...
Random Solutions  
 
programming4us programming4us