.NET equivalent of char dd = (char)(bh ^ 0xa & strD3f.charAt(strU6));

I have a snippet of Java code I need to convert to .NET. I can not figure out how to do it.


char dd = (char)(bh ^ 0xa & strD3f.charAt(strU6));

Open in new window


I've spent an hour googling each piece to no avail.

Thanks
LVL 1
JPERKS1985Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
Try
strD3f[strU6]

Open in new window

0
unknown_routineCommented:
char dd=    (char)(bh ^ 0xa  &  strD3f[strU6]);  


As you see it is very similar to Java as bitwise operators ^ and & are same in C#.

The only change is removing of charAt which C# does not use it.
0
CEHJCommented:
Of course, my answer depends on the original being correct, despite its highly misleading naming of variables of entirely different types in the same way
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

JPERKS1985Author Commented:
With unknown_routine solution I still get "Error      2      Operator 'And' is not defined for types 'Integer' and 'Char"
0
CEHJCommented:
Try

char dd = (char)(bh ^ 0xa & (int)strD3f[strU6]);

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CEHJCommented:
:)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.