Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Text;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
- using System.Runtime.InteropServices; // adding Console
- namespace WpfAppHurst
- {
- /// <summary>
- /// Interaction logic for MainWindow.xaml
- /// </summary>
- public partial class MainWindow : Window
- {
- [DllImport("Kernel32")]
- public static extern void AllocConsole();
- [DllImport("Kernel32", SetLastError = true)]
- public static extern void FreeConsole();
- /// <summary>
- /// Copilot
- /// </summary>
- public MainWindow()
- {
- InitializeComponent();
- AllocConsole();
- ConsoleMethod(null);
- }
- public void ConsoleMethod(Object param)
- {
- Console.WriteLine("test");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement