小编Jar*_*ner的帖子

如何检查TreeView中是否选择了一个项目(C#)

如何检查TreeView中是否选择了某个项目?在C#中

我想检查是否选择了任何内容,而不是特定项目

c# winforms

1
推荐指数
1
解决办法
1万
查看次数

如何捕获异常并继续程序?C#

我需要检查一下他们输入的文件是否存在,我怎么能这样做,我尝试使用try&catch它没有效果

if (startarg.Contains("-del") == true)
            {
                //Searches "Uninstallers" folder for uninstaller containing the name that they type after "-del" and runs it
                string uninstalldirectory = Path.Combine(Directory.GetCurrentDirectory(), "Uninstallers");
                DirectoryInfo UninstallDir = new DirectoryInfo(uninstalldirectory);
                string installname = startarg[2].ToString();
                //Removes file extesion "-del "
                installname.Remove(0, 5);
                string FullFilePath = Path.Combine(uninstalldirectory, installname);
                try
                {
                    //Makes the uninstaller invisible to the user and sets other settings
                    Process Uninstaller = new Process();
                    Uninstaller.StartInfo.FileName = FullFilePath;
                    Uninstaller.StartInfo.UseShellExecute = false;
                    Uninstaller.StartInfo.CreateNoWindow = true;
                    Uninstaller.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
                    Uninstaller.Start();
                } …
Run Code Online (Sandbox Code Playgroud)

c# exception try-catch

1
推荐指数
1
解决办法
3115
查看次数

C#从单独的表单中获取变量值

如何从单独的表单中获取变量的值?

c# winforms

1
推荐指数
1
解决办法
7262
查看次数

如何在python中创建程序启动参数

我刚刚开始学习python,我正在编写的程序需要参数才能运行特定的任务.例如(程序名称是Samtho)

samtho -i Mozilla_Firefox
Run Code Online (Sandbox Code Playgroud)

我怎样才能做到这一点?

python parameters startup pydev

0
推荐指数
2
解决办法
464
查看次数

为什么"def InvalidArgsSpecified:"语法错误?

我刚刚开始学习python ...所以请耐心等待

为什么这个代码块给我一个无效的语法错误

def InvalidArgsSpecified:
    print ("*** Simtho Usage ***\n")
    print ("-i Installs Local App,, include full path")
    print ("-u Uninstalls Installed App,include ID or Name")
    print ("-li Lists all installed Apps and their ID")
    print ("-all Lists All Apps in Repository")
    print ("-di Downloads and Installs App from repository, enter the title or id number")
    print ("-dw Downloads and Installs Single App from a full link")
    print ("-rmall Removes All Packages installed and removes Simtho itself\n")
    print ("*** End …
Run Code Online (Sandbox Code Playgroud)

python function syntax-error

0
推荐指数
1
解决办法
187
查看次数

For Loop未执行

该公式根本没有执行.我尝试使用printf调试,它i在代码的末尾打印出0

#include <stdio.h>

int main()
{
 int i, base, height;
 printf("Lumber  Cross-Sectional   Moment of Section\n");
 printf("Size  Area    Inertia  Modulus\n");
 for (i = 0; i > 35; i++)
 {
  if (i == 6 || i == 12 || i == 18|| i == 24 || i == 30)
  {
   base = base * 2;
   height = 2;
  }
  if (i != 6 || i != 12 || i != 18 || i != 24 || i != …
Run Code Online (Sandbox Code Playgroud)

c for-loop

0
推荐指数
1
解决办法
3704
查看次数