Skip to content

Commit b4ce861

Browse files
Merge pull request #10716 from dotnet/main
Merge main into live
2 parents ec579ee + e6d5a9e commit b4ce861

File tree

372 files changed

+1159
-1189
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

372 files changed

+1159
-1189
lines changed

snippets/common/VS_Snippets_WebNet/Classic RequiredFieldValidator Example/Common/source.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
void ValidateBtn_Click(Object sender, EventArgs e) {
88

9-
if (Page.IsValid == true) {
9+
if (Page.IsValid) {
1010
lblOutput.Text = "Required field is filled!";
1111
}
1212
else {

snippets/cpp/VS_Snippets_CLR/AsyncDelegateExamples/cpp/polling.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ void main()
2121
threadId, nullptr, nullptr);
2222

2323
// Poll while simulating work.
24-
while(result->IsCompleted == false)
24+
while(!result->IsCompleted)
2525
{
2626
Thread::Sleep(250);
2727
Console::Write(".");

snippets/cpp/VS_Snippets_CLR/T.TryParse/CPP/tp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ static void Show( bool parseResult, String^ typeName, String^ parseValue )
1616
String^ msgFailure = L"** Parse for {0} failed. Invalid input.";
1717

1818
//
19-
if ( parseResult == true )
19+
if ( parseResult )
2020
Console::WriteLine( msgSuccess, typeName, parseValue );
2121
else
2222
Console::WriteLine( msgFailure, typeName );

snippets/cpp/VS_Snippets_CLR/console.beep/CPP/beep.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ int main()
88
int x = 0;
99

1010
//
11-
if ( (args->Length == 2) && (Int32::TryParse( args[ 1 ], x ) == true) && ((x >= 1) && (x <= 9)) )
11+
if ( (args->Length == 2) && (Int32::TryParse( args[ 1 ], x )) && ((x >= 1) && (x <= 9)) )
1212
{
1313
for ( int i = 1; i <= x; i++ )
1414
{

snippets/cpp/VS_Snippets_CLR/console.cursorvis/CPP/vis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ int main()
2121
{
2222
Console::WriteLine( m1, ((Console::CursorVisible == true) ? (String^)"VISIBLE" : "HIDDEN") );
2323
s = Console::ReadLine();
24-
if ( String::IsNullOrEmpty( s ) == false )
24+
if ( !String::IsNullOrEmpty( s ) )
2525
if ( s[ 0 ] == '+' )
2626
Console::CursorVisible = true;
2727
else

snippets/cpp/VS_Snippets_CLR/console.keyavailable/CPP/ka.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ int main()
1111

1212
// Your code could perform some useful task in the following loop. However,
1313
// for the sake of this example we'll merely pause for a quarter second.
14-
while ( Console::KeyAvailable == false )
14+
while ( !Console::KeyAvailable )
1515
Thread::Sleep( 250 );
1616
cki = Console::ReadKey( true );
1717
Console::WriteLine( "You pressed the '{0}' key.", cki.Key );

snippets/cpp/VS_Snippets_CLR/directoryinfocreatesub/CPP/directoryinfocreatesub.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ int main()
99
DirectoryInfo^ di = gcnew DirectoryInfo( "TempDir" );
1010

1111
// Create the directory only if it does not already exist.
12-
if ( di->Exists == false )
12+
if ( !di->Exists )
1313
di->Create();
1414

1515

snippets/cpp/VS_Snippets_CLR_System/system.GC.ReRegisterForFinalize Example/CPP/class1.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ref class MyFinalizeObject
1717

1818
~MyFinalizeObject()
1919
{
20-
if ( hasFinalized == false )
20+
if ( !hasFinalized )
2121
{
2222
Console::WriteLine( "First finalization" );
2323

snippets/cpp/VS_Snippets_CLR_System/system.Random.Next/CPP/next3.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ void main()
88
unsigned int numbers = 0;
99
Random^ rnd = gcnew Random();
1010

11-
if (! UInt32::TryParse(line, numbers))
11+
if (!UInt32::TryParse(line, numbers))
1212
numbers = 10;
1313

1414
for (unsigned int ctr = 1; ctr <= numbers; ctr++)

snippets/cpp/VS_Snippets_CLR_System/system.String.Format/cpp/formatexample2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ref class CustomerFormatter : IFormatProvider, ICustomFormatter
2121
Object^ arg,
2222
IFormatProvider^ formatProvider)
2323
{
24-
if (! this->Equals(formatProvider))
24+
if (!this->Equals(formatProvider))
2525
{
2626
return nullptr;
2727
}

0 commit comments

Comments
 (0)