1

This is code in VB.NET:

Protected Overrides ReadOnly Property CreateParams() As CreateParams Get Dim CP As CreateParams = MyBase.CreateParams CP.Style = &HA0000 Return CP End Get 

And I want to convert it into C#. As per my assumption below is how the code in C# will look like. For the above code where CP.Style = &HA000, what should I put in C# code. I have left it empty.

protected override CreateParams CreateParams { get { CreateParams cp = base.CreateParams; cp.Style = return cp; } } 
1
  • One generic way to do this is to compile the code, then disassemble it in reflector. Note that reflector will stop being free really soon. Commented Mar 3, 2011 at 17:42

3 Answers 3

8

You need:

CreateParams cp = base.CreateParams; cp.Style = 0xA000; return cp; 

0x is the prefix for a hex integer literal in C#, instead of &H in VB.

Sign up to request clarification or add additional context in comments.

Comments

0

Missing line:

cp.Style = 0xA0000; 

Comments

0
protected override CreateParams CreateParams { get { CreateParams CP = base.CreateParams; CP.Style = 0xa0000; return CP; } } 

Try this convertor

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.