What do you want to save?
Add Code snippet
New code examples
-
C# 2021-11-06 20:33:07
c# how to start an application and detect if started
using System.Diagnostics; using System.IO; using System.Reflection.Assembly; class Class { if (Process.GetProcessesByName(Path.GetFileNameWithoutExtension(GetEntryAssembly().Location)).Count() > 1) { Process.GetCurrentProcess().Kill(); } } Add solution -
C# 2021-11-06 14:25:17
start wpf application when windows start
Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); string str = Assembly.GetExecutingAssembly().Location; key.SetValue("Camaleone", str); Add solution -
C# 2021-11-05 07:33:17
.net core 3.1 mediatr
services.AddMediatR(Assembly.GetExecutingAssembly()); Add solution -
Other 2021-10-30 04:02:14
Unable to find package 'Microsoft.VisualStudio.TestTools.UnitTesting
Just had this issue, and this answer was the solution. Anyone have any insight as to why this is the case? Why is the namespace Microsoft.VisualStudio.TestTools.UnitTesting and the assembly is Microsoft.VisualStudio.QualityTools.UnitTestFramework? Why cou... Add solution -
Shell/Bash 2021-10-27 22:54:12
browse for folder powershell
function BrowseForFolder($initialDirectory="") { [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms")|Out-Null $folderBrowserDialog = New-Object System.Windows.Forms.FolderBrowserDialog $folderBrowserDi... Add solution -
C# 2021-10-27 09:08:10
c# compile code at runtime
using System.CodeDom.Compiler; CSharpCodeProvider codeProvider = new CSharpCodeProvider(); CompilerParameters myParameters = new CompilerParameters(); myParameters.GenerateExecutable = false; myParameters.OutputAssembly = @"C:\assembly.dll"; Co... Add solution -
C# 2021-10-26 04:54:22
c++ with visual studio selenium webdriver
using System;using Microsoft.VisualStudio.TestTools.UnitTesting;using OpenQA.Selenium;using OpenQA.Selenium.Firefox;using OpenQA.Selenium.Chrome;using OpenQA.Selenium.Support.UI; namespace SeleniumWebDevTesting{ [TestClass] public class TestSelen... Add solution
Best helpers
Bad Dog
+5
Legion123
+5
Shawn Wang
+5
LBushkin
+5
OgWestside
+5
Mlevin
+5
Darah
+5
V. G.
+5
PeerPaso
+5
Tae-gon Kim
+5
Jacques27
+5
E meyr
+5
Jude Angione
+5
Human
+5
Aeth
+5