iam new to c# in vb.net i used
Give Me the alternate for Vb keywords in c#
"Optional"
Finalize method
Microsoft.VisualBasic.errobject

There's no optional keyword in C#, all method parameters are required unless you use variable parameters with the params keyword. A finalize method in VB.NET is a destructor in C#. A destructor has the same name as the constructor--the name of the class--except it's prefixed with a ~ symbol.

class Test {
  public Test() { } // Constructor
  ~Test() { } // Destructor
}

In the best case scenario you stop using ErrObject and start using .NET exceptions. All of the stuff in the VisualBasic namespace is there just for backward compatibility. If you use it instead of the .NET stuff, you're kind of wasting the power that .NET gives you.

In reality it's not always that easy, so you can reference the Microsoft.VisualBasic dll and use all of it in C# too. :)

Be a part of the DaniWeb community

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