privateT GetParent<T>(DependencyObject obj)
where T : DependencyObject
{
if(obj == null)
{
returnnull;
}
elseif(obj isT)
{
return(T)obj;
}
DependencyObject parent = VisualTreeHelper.GetParent(obj);
returnGetParent<T>(parent);
}
ASKER
The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.
TRUSTED BY
You could try the following:
http://www.developerfusion.com/tools/convert/csharp-to-vb/