Skip to content

Commit 64cf132

Browse files
authored
typos + space fixes - Part 3 (#4131)
* typos + space fixes * additional fixes * a few more fixes * feedback * Update httpwebresponse_getresponsestream.cpp * Update datagridcolumnstyle_readonlychanged.cpp * Update dateclient_socketpermission_toxml.cs * Update httpwebresponse_getresponsestream.cs * Update enumbuilder_setcustomattribute1.vb * Update credentialcache_getenumerator.vb * Update filewebresponse_contentlength_contenttype.vb * Update filewebresponse_getresponsestream.vb * Update httpwebresponse_getresponsestream.vb * Update mimecontentbinding_part_4.vb * Update webclient_baseaddress_responseheaders.vb * Update webclient_openwrite.vb * Update webclient_openwrite2.vb * Update httpbinding.vb * Update filewebresponse_close.vb * Update datagridcolumnstyle_readonlychanged.vb
1 parent d5b3156 commit 64cf132

File tree

106 files changed

+758
-758
lines changed

Some content is hidden

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

106 files changed

+758
-758
lines changed

samples/snippets/cpp/VS_Snippets_Remoting/DateClient_SocketPermission_ToXml/CPP/dateclient_socketpermission_toxml.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ instance of 'SocketPermission' is obtained using the 'FromXml' method. Another
1111
instance of 'SocketPermission' is created with the 'SocketPermission(NetworkAccess,
1212
TransportType, String*, int)' constructor. A third 'SocketPermission' Object* is
1313
formed from the union of the above two 'SocketPermission' objects with the use of the
14-
'Union' method of 'SocketPermission' class . This 'SocketPermission' Object* is used by
14+
'Union' method of 'SocketPermission' class. This 'SocketPermission' Object* is used by
1515
the 'GetDate' method to verify the permissions of the calling method. If the calling
1616
method has the requisite permissions the 'GetDate' method connects to the 'DateServer'
1717
and returns the current date that the 'DateServer' sends. If any exception occurs

samples/snippets/cpp/VS_Snippets_Remoting/FileWebResponse_GetResponseStream/CPP/filewebresponse_getresponsestream.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/* This program demonstrates the 'GetResponseStream' method of the 'FileWebResponse' class.
44
It creates a 'FileWebRequest' Object* and queries for a response.
55
The response stream obtained is piped to a higher level stream reader. The reader reads
6-
256 characters at a time , writes them into a String* and then displays the String* onto the console*/
6+
256 characters at a time, writes them into a String* and then displays the String* onto the console*/
77

88
#using <System.dll>
99

Original file line numberDiff line numberDiff line change
@@ -1,73 +1,73 @@
1-
// System::Net::HttpWebResponse::GetResponseStream
2-
/* This program demonstrates the 'GetResponseStream' method of the 'HttpWebResponse' class.
3-
It creates a web request and queries for a response. It then gets the response stream .
4-
This response stream is piped to a higher level stream reader. The reader reads 256 characters at a time ,
5-
writes them into a String* and then displays the String* in the console*/
6-
7-
#using <System.dll>
8-
9-
using namespace System;
10-
using namespace System::Net;
11-
using namespace System::IO;
12-
using namespace System::Text;
13-
14-
void GetPage( String^ url )
15-
{
16-
try
17-
{
18-
// <Snippet1>
19-
// Creates an HttpWebRequest with the specified URL.
20-
HttpWebRequest^ myHttpWebRequest = (HttpWebRequest^)( WebRequest::Create( url ) );
21-
// Sends the HttpWebRequest and waits for the response.
22-
HttpWebResponse^ myHttpWebResponse = (HttpWebResponse^)( myHttpWebRequest->GetResponse() );
23-
// Gets the stream associated with the response.
24-
Stream^ receiveStream = myHttpWebResponse->GetResponseStream();
25-
Encoding^ encode = System::Text::Encoding::GetEncoding( "utf-8" );
26-
// Pipes the stream to a higher level stream reader with the required encoding format.
27-
StreamReader^ readStream = gcnew StreamReader( receiveStream,encode );
28-
Console::WriteLine( "\r\nResponse stream received." );
29-
array<Char>^ read = gcnew array<Char>(256);
30-
// Reads 256 characters at a time.
31-
int count = readStream->Read( read, 0, 256 );
32-
Console::WriteLine( "HTML...\r\n" );
33-
while ( count > 0 )
34-
{
35-
// Dumps the 256 characters on a String* and displays the String* to the console.
36-
String^ str = gcnew String( read,0,count );
37-
Console::Write( str );
38-
count = readStream->Read( read, 0, 256 );
39-
}
40-
Console::WriteLine( "" );
41-
// Releases the resources of the response.
42-
myHttpWebResponse->Close();
43-
// Releases the resources of the Stream.
44-
readStream->Close();
45-
// </Snippet1>
46-
}
47-
catch ( WebException^ e )
48-
{
49-
Console::WriteLine( "\r\nWebException Raised. The following error occurred : {0}", e->Status );
50-
}
51-
catch ( Exception^ e )
52-
{
53-
Console::WriteLine( "\nThe following Exception was raised : {0}", e->Message );
54-
}
55-
}
56-
57-
int main()
58-
{
59-
array<String^>^ args = Environment::GetCommandLineArgs();
60-
if ( args->Length < 2 )
61-
{
62-
Console::WriteLine( "\nPlease enter the url as command line parameter:" );
63-
Console::WriteLine( "Example:" );
64-
Console::WriteLine( "HttpWebResponse_GetResponseStream http://www.microsoft.com/net/" );
65-
}
66-
else
67-
{
68-
GetPage( args[ 1 ] );
69-
}
70-
71-
Console::WriteLine( "Press any key to continue..." );
72-
Console::ReadLine();
73-
}
1+
// System::Net::HttpWebResponse::GetResponseStream
2+
/* This program demonstrates the 'GetResponseStream' method of the 'HttpWebResponse' class.
3+
It creates a web request and queries for a response. It then gets the response stream.
4+
This response stream is piped to a higher level stream reader. The reader reads 256 characters at a time,
5+
writes them into a String* and then displays the String* in the console. */
6+
7+
#using <System.dll>
8+
9+
using namespace System;
10+
using namespace System::Net;
11+
using namespace System::IO;
12+
using namespace System::Text;
13+
14+
void GetPage( String^ url )
15+
{
16+
try
17+
{
18+
// <Snippet1>
19+
// Creates an HttpWebRequest with the specified URL.
20+
HttpWebRequest^ myHttpWebRequest = (HttpWebRequest^)( WebRequest::Create( url ) );
21+
// Sends the HttpWebRequest and waits for the response.
22+
HttpWebResponse^ myHttpWebResponse = (HttpWebResponse^)( myHttpWebRequest->GetResponse() );
23+
// Gets the stream associated with the response.
24+
Stream^ receiveStream = myHttpWebResponse->GetResponseStream();
25+
Encoding^ encode = System::Text::Encoding::GetEncoding( "utf-8" );
26+
// Pipes the stream to a higher level stream reader with the required encoding format.
27+
StreamReader^ readStream = gcnew StreamReader( receiveStream,encode );
28+
Console::WriteLine( "\r\nResponse stream received." );
29+
array<Char>^ read = gcnew array<Char>(256);
30+
// Reads 256 characters at a time.
31+
int count = readStream->Read( read, 0, 256 );
32+
Console::WriteLine( "HTML...\r\n" );
33+
while ( count > 0 )
34+
{
35+
// Dumps the 256 characters on a String* and displays the String* to the console.
36+
String^ str = gcnew String( read,0,count );
37+
Console::Write( str );
38+
count = readStream->Read( read, 0, 256 );
39+
}
40+
Console::WriteLine( "" );
41+
// Releases the resources of the response.
42+
myHttpWebResponse->Close();
43+
// Releases the resources of the Stream.
44+
readStream->Close();
45+
// </Snippet1>
46+
}
47+
catch ( WebException^ e )
48+
{
49+
Console::WriteLine( "\r\nWebException Raised. The following error occurred : {0}", e->Status );
50+
}
51+
catch ( Exception^ e )
52+
{
53+
Console::WriteLine( "\nThe following Exception was raised : {0}", e->Message );
54+
}
55+
}
56+
57+
int main()
58+
{
59+
array<String^>^ args = Environment::GetCommandLineArgs();
60+
if ( args->Length < 2 )
61+
{
62+
Console::WriteLine( "\nPlease enter the url as command line parameter:" );
63+
Console::WriteLine( "Example:" );
64+
Console::WriteLine( "HttpWebResponse_GetResponseStream http://www.microsoft.com/net/" );
65+
}
66+
else
67+
{
68+
GetPage( args[ 1 ] );
69+
}
70+
71+
Console::WriteLine( "Press any key to continue..." );
72+
Console::ReadLine();
73+
}

samples/snippets/cpp/VS_Snippets_Remoting/WebResponse_GetResponseStream/CPP/webresponse_getresponsestream.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// System::Net::WebResponse::GetResponseStream
22

33
/* This program demonstrates the 'GetResponseStream' method of the 'WebResponse' class.
4-
It creates a web request and queries for a response. It then gets the response stream . This response stream
5-
is piped to a higher level stream reader. The reader reads 256 characters at a time , writes them into a String* and then displays the String* in the console.
4+
It creates a web request and queries for a response. It then gets the response stream. This response stream
5+
is piped to a higher level stream reader. The reader reads 256 characters at a time, writes them into a String* and then displays the String* in the console.
66
*/
77

88
#using <System.dll>

samples/snippets/cpp/VS_Snippets_Remoting/WellKnownServiceTypeEntry_Server/CPP/wellknownservicetypeentry_server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/*
55
The following example demonstrates the 'WellKnownServiceTypeEntry' class.
66
It registers a 'HttpChannel' object with the channel services. Then registers the 'HelloServer'
7-
type as well known type with the Remoting Infrastructure at the service end . It displays the
7+
type as well known type with the Remoting Infrastructure at the service end. It displays the
88
properties of the 'WellKnownServiceTypeEntry' object holding the values for the above well-known
99
type .
1010
*/

samples/snippets/cpp/VS_Snippets_Winforms/DataGridColumnStyle_PropertyDescriptorChanged/CPP/propertydescriptorchanged.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// System::Windows::Forms::DataGridColumnStyle::PropertyDescriptorChanged
22

33
/* The following example demonstrates 'PropertyDescriptorChanged' Event of 'DataGridColumnStyle' class.
4-
A DataGrid and Button are added to a form. When user clicks on the button, the 'PropertyDescriptor'Format of
5-
'DataGridColumnStyle' is changed to 'Currency' format . This raises 'PropertyDescriptorChanged' event,
4+
A DataGrid and Button are added to a form. When user clicks on the button, the 'PropertyDescriptor' Format of
5+
'DataGridColumnStyle' is changed to 'Currency' format. This raises 'PropertyDescriptorChanged' event,
66
which then calls user defined EventHandler function.
77
*/
88

samples/snippets/cpp/VS_Snippets_Winforms/DataGridColumnStyle_ReadOnlyChanged/CPP/datagridcolumnstyle_readonlychanged.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// System::Windows::Forms::DataGridColumnStyle::ReadOnlyChanged
22

33
/*
4-
The following example demonstrates 'ReadOnlyChanged' Event of 'DataGridColumnStyle' class.
5-
It adds DataGrid and Button to a form. When user clicks on button the 'ReadOnly' property of 'DataGridColumnStyle'
6-
is changed . This raises the 'ReadOnlyChanged' event which then calls the user defined EventHandler function .
4+
The following example demonstrates the 'ReadOnlyChanged' event of the 'DataGridColumnStyle' class.
5+
It adds DataGrid and Button to a form. When user clicks on button the 'ReadOnly' property of 'DataGridColumnStyle'
6+
is changed. This raises the 'ReadOnlyChanged' event which then calls the user defined EventHandler function.
77
*/
88

99
#using <System.dll>

0 commit comments

Comments
 (0)