Sobes.tech
Junior

What programming languages are used for developing native applications on Windows?

sobes.tech AI

Answer from AI

  • C# (for .NET development)
  • C++ (a classic language for system programming and development on WinAPI/MFC)
  • Visual Basic .NET (for .NET development)
  • XAML (for describing user interfaces in WPF/UWP)

Examples of using C# and C++:

// Simple example in C# (WPF)
using System.Windows;

namespace HelloWorld
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }
    }
}
// Simple example in C++ (WinAPI)
#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
    MessageBox(NULL, L"Hello, world!", L"Example", MB_OK);
    return 0;
}