Environment.UserInteractive Proprietà
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene un valore che indica se il processo corrente viene eseguito in modalità interattiva utente.
public:
static property bool UserInteractive { bool get(); };
public static bool UserInteractive { get; }
static member UserInteractive : bool
Public Shared ReadOnly Property UserInteractive As Boolean
true
se il processo corrente viene eseguito in modalità interattiva utente; in caso contrario, false
.
Nell'esempio seguente viene visualizzato se il processo corrente è in esecuzione in modalità interattiva dell'utente.
// Sample for the Environment::UserInteractive property
using namespace System;
int main()
{
Console::WriteLine();
Console::WriteLine( "UserInteractive: {0}", Environment::UserInteractive );
}
/*
This example produces the following results:
UserInteractive: True
*/
// Sample for the Environment.UserInteractive property
using System;
class Sample
{
public static void Main()
{
Console.WriteLine();
Console.WriteLine("UserInteractive: {0}", Environment.UserInteractive);
}
}
/*
This example produces the following results:
UserInteractive: True
*/
// Sample for the Environment.UserInteractive property
open System
printfn $"\nUserInteractive: {Environment.UserInteractive}"
// This example produces the following results:
// UserInteractive: True
' Sample for the Environment.UserInteractive property
Class Sample
Public Shared Sub Main()
Console.WriteLine()
Console.WriteLine("UserInteractive: {0}", Environment.UserInteractive)
End Sub
End Class
'
'This example produces the following results:
'
'UserInteractive: True
'
La UserInteractive proprietà segnala false
un processo di Windows o un servizio come IIS che viene eseguito senza un'interfaccia utente. Se questa proprietà è false
, non visualizzare finestre di dialogo modali o finestre di messaggio perché non è disponibile alcuna interfaccia utente grafica con cui l'utente può interagire.
Prodotto | Versioni |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
Feedback su .NET
.NET è un progetto di open source. Selezionare un collegamento per fornire feedback: