Please tell vb.net equivalent of following:

C# Syntax

public class AuthorList : Control
	static AuthorList()
			Post.Saved += delegate { _Html = null; };

I tried using C# to VB.NET code converter which gave me this:

Public Class AuthorList
        Inherits Control
           Shared Sub New()
               Post.Saved += Function() Do
               _Html = Nothing
           End Sub
   End Sub

Which on build in visual studio 2008 gives an error.

Please help

Re: VB.NET equivalent in C# 80 80

Use AddHandler.

AddHandler Post.Saved, Function() _Html = Nothing
Re: VB.NET equivalent in C# 80 80

Thanks adatapost this is the way i did finally

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.