I converted my vb.net to c# Now what

Carroll Jolly 21 Reputation points
2023-03-23T16:10:50.7466667+00:00

I program with visual basic and want to port a vb program to my iPhone. So I converted my vb program to C#. I used the conversion extension to convert my program and after cleaning up several errors, I managed a successful conversion. Now in my solution explorer, I have both .vb forms and .cs forms. For example, I have myapp.vb and myapp.cs, myapp.designer.vb and myapp.designer.cs but I only have one .resx file. How do I run the C# version of the program and not the vb version?

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,819 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,713 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 63,741 Reputation points
    2023-03-23T17:23:32.22+00:00

    you should remove the vb forms. the resource file is the same for both.

    but if your goal to run on the iPhone, then you need to redo the forms anyway. winforms (or WPF) is not supported on non-windows o/s's (iPhone)

    you should create a new Maui project, and build the new forms with Maui xmal. You can copy some of the code behind, but it will require changes.

    hopefully, you used separate projects for non UI layers, but if not, you can just copy the code to the new project.

    https://dotnet.microsoft.com/en-us/apps/maui

    note: while you can develop Maui apps on windows, you will need a Mac with Xcode installed to actually build and test the iPhone app. You will also need an apple developers license ($99/year) to sign and run the app.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.