Hi
i am developing a revit plugin using VB.NET 2012. i have a code in C#, i don't program C#, i am I am newbie in programming. I need transfer this C# method to VB.NET. somebody help me?, this is the C# code
protected override void ApplySortCore(PropertyDescriptor prop, ListSortDirection direction)
{
List<T> itemsList = this.Items as List<T>;
itemsList.Sort(delegate(T t1, T t2)
{
this.propertyDescriptor = prop;
this.listSortDirection = direction;
this.isSorted = true;
int reverse = (direction == ListSortDirection.Ascending) ? 1 : -1;
object value1 = prop.GetValue(t1);
object value2 = prop.GetValue(t2);
return reverse * Comparer.Default.Compare(value1, value2);
});
this.OnListChanged(new ListChangedEventArgs(ListChangedType.Reset, -1));
}
this is other C# code
namespace RevitAddinDocClos
{
class App : IExternalApplication
{
public Result OnStartup(UIControlledApplication a)
{
a.ControlledApplication.DocumentClosing += ControlledApplication_DocumentClosing;
return Result.Succeeded;
}
void ControlledApplication_DocumentClosing(object sender, Autodesk.Revit.DB.Events.DocumentClosingEventArgs e)
{
TaskDialog.Show("closing", "doc closing");
}
public Result OnShutdown(UIControlledApplication a)
{
return Result.Succeeded;
}
}
}
Regards