diff --git a/snippets/cpp/VS_Snippets_CLR/Marshal/cpp/marshal.cpp b/snippets/cpp/VS_Snippets_CLR/Marshal/cpp/marshal.cpp
index 87fd8d8dab6..fab521fd327 100644
--- a/snippets/cpp/VS_Snippets_CLR/Marshal/cpp/marshal.cpp
+++ b/snippets/cpp/VS_Snippets_CLR/Marshal/cpp/marshal.cpp
@@ -14,7 +14,7 @@ extern bool CloseHandle(IntPtr h);
int main()
{
- //
+ //
// Demonstrate the use of public static fields of the Marshal
// class.
Console::WriteLine(
@@ -23,18 +23,8 @@ int main()
Marshal::SystemMaxDBCSCharSize);
//
- //
- // Demonstrate the use of the SizeOf method of the Marshal
- // class.
- Console::WriteLine("Number of bytes needed by a Point object: {0}",
- Marshal::SizeOf(Point::typeid));
- Point point;
- Console::WriteLine("Number of bytes needed by a Point object: {0}",
- Marshal::SizeOf(point));
- //
-
//
- // Demonstrate how to call GlobalAlloc and
+ // Demonstrate how to call GlobalAlloc and
// GlobalFree using the Marshal class.
IntPtr hglobal = Marshal::AllocHGlobal(100);
Marshal::FreeHGlobal(hglobal);
@@ -53,15 +43,13 @@ int main()
// This is a platform invoke prototype. SetLastError is true,
// which allows the GetLastWin32Error method of the Marshal class
-// to work correctly.
+// to work correctly.
[DllImport("Kernel32", ExactSpelling = true, SetLastError = true)]
extern bool CloseHandle(IntPtr h);
//
// This code produces the following output.
-//
+//
// SystemDefaultCharSize=2, SystemMaxDBCSCharSize=1
-// Number of bytes needed by a Point object: 8
-// Number of bytes needed by a Point object: 8
// CloseHandle call failed with an error code of: 6
//
diff --git a/snippets/cpp/VS_Snippets_CLR/PtrToStructure/CPP/pts.cpp b/snippets/cpp/VS_Snippets_CLR/PtrToStructure/CPP/pts.cpp
deleted file mode 100644
index 9f5c2be1644..00000000000
--- a/snippets/cpp/VS_Snippets_CLR/PtrToStructure/CPP/pts.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-#using
-
-using namespace System;
-using namespace System::Runtime::InteropServices;
-
-namespace PtrToStructureExample
-{
- ref class PtrToStructureTester
- {
- public:
- //
- [StructLayout(LayoutKind::Sequential)]
- ref class INNER
- {
- public:
- [MarshalAs(UnmanagedType::ByValTStr,SizeConst=10)]
- String^ field;
-
- INNER()
- {
- field = "Test";
- }
- };
-
- [StructLayout(LayoutKind::Sequential)]
- value struct OUTER
- {
- public:
- [MarshalAs(UnmanagedType::ByValTStr,SizeConst=10)]
- String^ field;
-
- [MarshalAs(UnmanagedType::ByValArray,SizeConst=100)]
- array^ inner;
- };
-
- [DllImport("SomeTestDLL.dll")]
- static void CallTest(OUTER^ outerStructurePointer);
-
- void static Work()
- {
- OUTER outerStructure;
- array^ innerArray = gcnew array(10);
- INNER^ innerStructure = gcnew INNER;
- int structSize = Marshal::SizeOf(innerStructure);
- int size = innerArray->Length * structSize;
- outerStructure.inner = gcnew array(size);
-
- try
- {
- CallTest(outerStructure);
- }
- catch (SystemException^ ex)
- {
- Console::WriteLine(ex->Message);
- }
-
- IntPtr buffer = Marshal::AllocCoTaskMem(structSize * 10);
- Marshal::Copy(outerStructure.inner, 0, buffer, structSize * 10);
- int currentOffset = 0;
- for (int i = 0; i < 10; i++)
- {
- innerArray[i] = safe_cast(Marshal::PtrToStructure(
- IntPtr(buffer.ToInt32() + currentOffset),
- INNER::typeid));
- currentOffset += structSize;
- }
- Console::WriteLine(outerStructure.field);
- Marshal::FreeCoTaskMem(buffer);
- }
- //
- };
-}
-
-void main()
-{
- PtrToStructureExample::PtrToStructureTester::Work();
-}
diff --git a/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.PolicyStatement_Evt/CPP/members.cpp b/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.PolicyStatement_Evt/CPP/members.cpp
deleted file mode 100644
index c41e32df504..00000000000
--- a/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.PolicyStatement_Evt/CPP/members.cpp
+++ /dev/null
@@ -1,224 +0,0 @@
-// This sample demonstrates how to use each member of the PolicyStatement
-// class.
-//
-using namespace System;
-using namespace System::Security;
-using namespace System::Security::Policy;
-using namespace System::Security::Principal;
-using namespace System::Security::Permissions;
-
-ref class Members
-{
-public:
- [STAThread]
- static void Main()
- {
- // Create two new policy statements.
- PolicyStatement^ policyStatement = firstConstructorTest();
- PolicyStatement^ policyStatement2 = secondConstructorTest();
-
- // Add attributes to the first policy statement.
- //
- policyStatement->Attributes = PolicyStatementAttribute::All;
- //
-
- // Create a copy of the first policy statement.
- PolicyStatement^ policyStatementCopy = createCopy( policyStatement );
- addXmlMember( &policyStatementCopy );
-
- summarizePolicyStatment( policyStatement );
- Console::Write( L"This sample completed successfully; " );
- Console::WriteLine( L"press Enter to exit." );
- Console::ReadLine();
- }
-
-private:
- // Construct a PolicyStatement with an Unrestricted permission set.
- static PolicyStatement^ firstConstructorTest()
- {
- // Construct the permission set.
- //
- PermissionSet^ permissions = gcnew PermissionSet(
- PermissionState::Unrestricted );
- permissions->AddPermission( gcnew SecurityPermission(
- SecurityPermissionFlag::Execution ) );
- permissions->AddPermission( gcnew ZoneIdentityPermission(
- SecurityZone::MyComputer ) );
-
- // Create a policy statement based on the newly created permission
- // set.
- PolicyStatement^ policyStatement = gcnew PolicyStatement(
- permissions );
- //
-
- return policyStatement;
- }
-
- // Construct a PolicyStatement with an Unrestricted permission set and
- // the LevelFinal attribute.
- static PolicyStatement^ secondConstructorTest()
- {
- // Construct the permission set.
- //
- PermissionSet^ permissions = gcnew PermissionSet(
- PermissionState::Unrestricted );
- permissions->AddPermission( gcnew SecurityPermission(
- SecurityPermissionFlag::Execution ) );
- permissions->AddPermission( gcnew ZoneIdentityPermission(
- SecurityZone::MyComputer ) );
-
- PolicyStatementAttribute levelFinalAttribute =
- PolicyStatementAttribute::LevelFinal;
-
- // Create a new policy statement with the specified permission set.
- // The LevelFinal attribute is set to prevent the evaluation of lower
- // policy levels in a resolve operation.
- PolicyStatement^ policyStatement = gcnew PolicyStatement(
- permissions,levelFinalAttribute );
- //
-
- return policyStatement;
- }
-
- // Add a named permission set to the specified PolicyStatement.
- static void AddPermissions( interior_ptrpolicyStatement )
- {
- // Construct a NamedPermissionSet with basic permissions.
- //
- NamedPermissionSet^ allPerms = gcnew NamedPermissionSet(
- L"allPerms" );
- allPerms->AddPermission( gcnew SecurityPermission(
- SecurityPermissionFlag::Execution ) );
- allPerms->AddPermission( gcnew ZoneIdentityPermission(
- SecurityZone::MyComputer ) );
- allPerms->AddPermission( gcnew SiteIdentityPermission(
- L"www.contoso.com" ) );
-
- ( *policyStatement)->PermissionSet = allPerms;
- //
- }
-
- // If a class attribute is not found in the specified PolicyStatement,
- // add a child XML element with an added class attribute.
- static void addXmlMember( interior_ptrpolicyStatement )
- {
- //
- SecurityElement^ xmlElement = ( *policyStatement)->ToXml();
- //
- if ( xmlElement->Attribute(L"class") == nullptr )
- {
- //
- SecurityElement^ newElement = gcnew SecurityElement(
- L"PolicyStatement" );
- newElement->AddAttribute( L"class", (
- *policyStatement)->ToString() );
- newElement->AddAttribute( L"version", L"1.1" );
-
- newElement->AddChild( gcnew SecurityElement( L"PermissionSet" ) );
-
- ( *policyStatement)->FromXml( newElement );
- //
-
- Console::Write( L"Added the class attribute and modified its " );
- Console::WriteLine( L"version number.\n{0}", newElement );
- }
- }
-
- // Verify that the type of the specified object is a PolicyStatement type
- // then create a copy of the object.
- static PolicyStatement^ createCopy( Object^ sourceObject )
- {
- PolicyStatement^ returnedStatement = gcnew PolicyStatement( nullptr );
- // Compare specified object type with the PolicyStatement type.
- //
- if ( sourceObject->GetType()->Equals( PolicyStatement::typeid ) )
- //
- {
- returnedStatement = getCopy(
- static_cast(sourceObject) );
- }
- else
- {
- throw gcnew ArgumentException(
- L"Expected the PolicyStatement type." );
- }
-
- return returnedStatement;
- }
-
- // Return a copy of the specified PolicyStatement if the result of the
- // Copy command is an equivalent object. Otherwise, return the
- // original PolicyStatement object.
- static PolicyStatement^ getCopy( PolicyStatement^ policyStatement )
- {
- // Create an equivalent copy of the policy statement.
- //
- PolicyStatement^ policyStatementCopy = policyStatement->Copy();
- //
-
- // Compare the specified objects for equality.
- //
- if ( !policyStatementCopy->Equals( policyStatement ) )
- //
- {
- return policyStatementCopy;
- }
- else
- {
- return policyStatement;
- }
- }
-
- // Summarize the attributes of the specified PolicyStatement on the
- // console window.
- static void summarizePolicyStatment( PolicyStatement^ policyStatement )
- {
- // Retrieve the class path for policyStatement.
- //
- String^ policyStatementClass = policyStatement->ToString();
- //
-
- //
- int hashCode = policyStatement->GetHashCode();
- //
-
- String^ attributeString = L"";
-
- // Retrieve the string representation of the PolicyStatement
- // attributes.
- //
- if ( policyStatement->AttributeString != nullptr )
- {
- attributeString = policyStatement->AttributeString;
- }
- //
-
- // Write a summary to the console window.
- Console::WriteLine( L"\n*** {0} summary ***", policyStatementClass );
- Console::Write( L"This PolicyStatement has been created with hash " );
- Console::Write( L"code({0}) ", hashCode );
-
- Console::Write( L"and contains the following attributes: " );
- Console::WriteLine( attributeString );
- }
-};
-
-int main()
-{
- Members::Main();
-}
-
-//
-// This sample produces the following output:
-//
-// Added the class attribute and modified the version number.
-//
-//
-//
-//
-// *** System.Security.Policy.PolicyStatement summary ***
-// PolicyStatement has been created with hash code(20) containing the
-// following attributes: Exclusive LevelFinal
-// This sample completed successfully; press Enter to exit.
-//
diff --git a/snippets/cpp/VS_Snippets_Remoting/HttpChannel/CPP/makefile b/snippets/cpp/VS_Snippets_Remoting/HttpChannel/CPP/makefile
deleted file mode 100644
index d4e70c2e1d1..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/HttpChannel/CPP/makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-all : client.exe client2.exe server.exe server2.exe
-
-
-client.exe : client.cpp service.dll
- cl /clr:pure client.cpp
-
-client2.exe : client2.cpp service.dll
- cl /clr:pure client.cpp
-
-server.exe : server.cpp service.dll
- cl /clr:pure server.cpp
-
-server2.exe : server2.cpp service.dll
- cl /clr:pure server2.cpp
-
-service.dll : service.cpp
- cl /LD /clr:pure service.cpp
-
-
diff --git a/snippets/cpp/VS_Snippets_Remoting/HttpChannel/CPP/server.cpp b/snippets/cpp/VS_Snippets_Remoting/HttpChannel/CPP/server.cpp
deleted file mode 100644
index 6e1b41e8078..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/HttpChannel/CPP/server.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-#using
-#using
-#using
-
-using namespace System;
-using namespace System::Runtime::Remoting;
-using namespace System::Runtime::Remoting::Channels;
-using namespace System::Runtime::Remoting::Channels::Tcp;
-using namespace System::Runtime::Remoting::Channels::Http;
-using namespace System::Runtime::Remoting::Lifetime;
-using namespace SampleNamespace;
-
-// This assembly contains a remote service and its server host wrapped together.
-int main()
-{
-
- // The following sample uses an HttpChannel constructor
- // to create a new HttpChannel that will listen on port 9000.
- // System::Runtime::Remoting::Channels.Http::HttpChannel.HttpChannel(int)
- // System::Runtime::Remoting::Channels.Http::HttpChannel
- //
- HttpChannel^ channel = gcnew HttpChannel( 9000 );
- ChannelServices::RegisterChannel( channel, false );
- RemotingConfiguration::RegisterWellKnownServiceType( SampleNamespace::SampleService::typeid, "MySampleService/SampleService::soap", WellKnownObjectMode::Singleton );
- Console::WriteLine( "** Press enter to end the server process. **" );
- Console::ReadLine();
- //
-
- return 0;
-}
\ No newline at end of file
diff --git a/snippets/cpp/VS_Snippets_Remoting/RemotingConfiguration_Configure_Client/CPP/makefile b/snippets/cpp/VS_Snippets_Remoting/RemotingConfiguration_Configure_Client/CPP/makefile
deleted file mode 100644
index 8f67adf1f7c..00000000000
--- a/snippets/cpp/VS_Snippets_Remoting/RemotingConfiguration_Configure_Client/CPP/makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-all : remotingconfiguration_configure_server.exe RemotingConfiguration_Configure_Client.exe
-
-
-remotingconfiguration_configure_server.exe : remotingconfiguration_configure_server.cpp RemotingConfiguration_Configure_Shared.dll
- cl /clr:pure remotingconfiguration_configure_server.cpp
-
-RemotingConfiguration_Configure_Client.exe : RemotingConfiguration_Configure_Client.cpp RemotingConfiguration_Configure_Shared.dll
- cl /clr:pure RemotingConfiguration_Configure_Client.cpp
-
-RemotingConfiguration_Configure_Shared.dll : RemotingConfiguration_Configure_Shared.cpp
- cl /clr:pure /LD RemotingConfiguration_Configure_Shared.cpp
diff --git a/snippets/cpp/VS_Snippets_Winforms/Form.Closing/CPP/form1.cpp b/snippets/cpp/VS_Snippets_Winforms/Form.Closing/CPP/form1.cpp
deleted file mode 100644
index 5d2138139bf..00000000000
--- a/snippets/cpp/VS_Snippets_Winforms/Form.Closing/CPP/form1.cpp
+++ /dev/null
@@ -1,122 +0,0 @@
-#using
-#using
-#using
-#using
-
-using namespace System;
-using namespace System::Drawing;
-using namespace System::Collections;
-using namespace System::ComponentModel;
-using namespace System::Windows::Forms;
-using namespace System::Data;
-
-///
-/// Summary description for Form1.
-///
-public ref class Form1: public System::Windows::Forms::Form
-{
-private:
- static String^ strMyOriginalText = "";
- System::Windows::Forms::Button^ button1;
- System::Windows::Forms::TextBox^ textBox1;
-
- ///
- /// Required designer variable.
- ///
- System::ComponentModel::Container^ components;
-
-public:
- Form1()
- {
- //
- // Required for Windows Form Designer support
- //
- InitializeComponent();
-
- //
- // TODO: Add any constructor code after InitializeComponent call
- //
- }
-
-public:
-
- ///
- /// Clean up any resources being used.
- ///
- ~Form1()
- {
- if ( components != nullptr )
- {
- delete components;
- }
- }
-
-private:
-
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- void InitializeComponent()
- {
- this->button1 = gcnew System::Windows::Forms::Button;
- this->textBox1 = gcnew System::Windows::Forms::TextBox;
- this->SuspendLayout();
-
- //
- // button1
- //
- this->button1->Location = System::Drawing::Point( 200, 64 );
- this->button1->Name = "button1";
- this->button1->TabIndex = 0;
- this->button1->Text = "button1";
-
- //
- // textBox1
- //
- this->textBox1->Location = System::Drawing::Point( 48, 64 );
- this->textBox1->Name = "textBox1";
- this->textBox1->TabIndex = 1;
- this->textBox1->Text = "textBox1";
-
- //
- // Form1
- //
- this->ClientSize = System::Drawing::Size( 292, 266 );
- array^temp0 = {this->textBox1,this->button1};
- this->Controls->AddRange( temp0 );
- this->Name = "Form1";
- this->Text = "Form1";
- this->Closing += gcnew System::ComponentModel::CancelEventHandler( this, &Form1::Form1_Closing );
- this->ResumeLayout( false );
- }
-
- //
-private:
- void Form1_Closing( Object^ /*sender*/, System::ComponentModel::CancelEventArgs^ e )
- {
- // Determine if text has changed in the textbox by comparing to original text.
- if ( textBox1->Text != strMyOriginalText )
- {
- // Display a MsgBox asking the user to save changes or abort.
- if ( MessageBox::Show( "Do you want to save changes to your text?", "My Application", MessageBoxButtons::YesNo ) == ::DialogResult::Yes )
- {
- // Cancel the Closing event from closing the form.
- e->Cancel = true;
-
- // Call method to save file...
- }
- }
- }
- //
-};
-
-///
-/// The main entry point for the application.
-///
-
-[STAThread]
-int main()
-{
- Application::Run( gcnew Form1 );
-}
diff --git a/snippets/csharp/System.Net.Sockets/TcpListener/.ctor/source.cs b/snippets/csharp/System.Net.Sockets/TcpListener/.ctor/source.cs
index f5226b1690c..6d811ebf83f 100644
--- a/snippets/csharp/System.Net.Sockets/TcpListener/.ctor/source.cs
+++ b/snippets/csharp/System.Net.Sockets/TcpListener/.ctor/source.cs
@@ -4,95 +4,89 @@
using System.Text;
using System.Threading;
-public class MyTcpListenerExample{
- public static int Main(string [] args){
-
- if (args.Length == 0)
- {
- Console.WriteLine("Enter a selection");
- return 0;
- }
-
- if (args[0] == "endpointExample"){
-
- //
- //Creates an instance of the TcpListener class by providing a local endpoint.
-
- IPAddress ipAddress = Dns.Resolve(Dns.GetHostName()).AddressList[0];
- IPEndPoint ipLocalEndPoint = new IPEndPoint(ipAddress, 11000);
-
- try{
- TcpListener tcpListener = new TcpListener(ipLocalEndPoint);
- }
- catch ( Exception e ){
- Console.WriteLine( e.ToString());
+public class MyTcpListenerExample
+{
+ public static int Main(string[] args)
+ {
+ if (args.Length == 0)
+ {
+ Console.WriteLine("Enter a selection");
+ return 0;
}
- //
- }
- else if (args[0] == "ipAddressExample"){
-
- //
- //Creates an instance of the TcpListener class by providing a local IP address and port number.
-
- IPAddress ipAddress = Dns.Resolve("localhost").AddressList[0];
- try{
- TcpListener tcpListener = new TcpListener(ipAddress, 13);
+ if (args[0] == "endpointExample")
+ {
+ //
+ //Creates an instance of the TcpListener class by providing a local endpoint.
+
+ IPAddress ipAddress = Dns.Resolve(Dns.GetHostName()).AddressList[0];
+ IPEndPoint ipLocalEndPoint = new IPEndPoint(ipAddress, 11000);
+
+ try
+ {
+ TcpListener tcpListener = new TcpListener(ipLocalEndPoint);
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e.ToString());
+ }
+ //
}
- catch ( Exception e){
- Console.WriteLine( e.ToString());
+ else if (args[0] == "ipAddressExample")
+ {
+ //
+ //Creates an instance of the TcpListener class by providing a local IP address and port number.
+
+ IPAddress ipAddress = Dns.Resolve("localhost").AddressList[0];
+
+ try
+ {
+ TcpListener tcpListener = new TcpListener(ipAddress, 13);
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e.ToString());
+ }
+
+ //
}
-
- //
- }
- else if (args[0] == "portNumberExample"){
-
- //
- //Creates an instance of the TcpListener class by providing a local port number.
- IPAddress ipAddress = Dns.Resolve("localhost").AddressList[0];
- try{
- TcpListener tcpListener = new TcpListener(ipAddress, 13);
- }
- catch ( Exception e ){
- Console.WriteLine( e.ToString());
+ else
+ {
+ IPAddress ipAddress = Dns.Resolve("localhost").AddressList[0];
+
+ TcpListener tcpListener = new TcpListener(ipAddress, 13);
+
+ tcpListener.Start();
+
+ Console.WriteLine("Waiting for a connection....");
+
+ try
+ {
+ //
+
+ // Accepts the pending client connection and returns a socket for communication.
+ Socket socket = tcpListener.AcceptSocket();
+ Console.WriteLine("Connection accepted.");
+
+ string responseString = "You have successfully connected to me";
+
+ //Forms and sends a response string to the connected client.
+ Byte[] sendBytes = Encoding.ASCII.GetBytes(responseString);
+ int i = socket.Send(sendBytes);
+ Console.WriteLine("Message Sent /> : " + responseString);
+ //
+ //Any communication with the remote client using the socket can go here.
+
+ //Closes the tcpListener and the socket.
+ socket.Shutdown(SocketShutdown.Both);
+ socket.Close();
+ tcpListener.Stop();
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e.ToString());
+ }
}
-
- //
- }
- else {
- IPAddress ipAddress = Dns.Resolve("localhost").AddressList[0];
-
- TcpListener tcpListener = new TcpListener(ipAddress, 13);
-
- tcpListener.Start();
-
- Console.WriteLine("Waiting for a connection....");
-
- try{
- //
-
- // Accepts the pending client connection and returns a socket for communication.
- Socket socket = tcpListener.AcceptSocket();
- Console.WriteLine("Connection accepted.");
-
- string responseString = "You have successfully connected to me";
-
- //Forms and sends a response string to the connected client.
- Byte[] sendBytes = Encoding.ASCII.GetBytes(responseString);
- int i = socket.Send(sendBytes);
- Console.WriteLine("Message Sent /> : " + responseString);
- //
- //Any communication with the remote client using the socket can go here.
-
- //Closes the tcpListener and the socket.
- socket.Shutdown(SocketShutdown.Both);
- socket.Close();
- tcpListener.Stop();
- }
- catch (Exception e) {
- Console.WriteLine(e.ToString());
- }
- }
- return 0;
- }
+ return 0;
}
+}
diff --git a/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs b/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs
index a5053147559..c543ecc1c25 100644
--- a/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs
+++ b/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs
@@ -105,27 +105,6 @@ public static void DisplayDefaultProxy()
}
//
- //
- public static void CheckDefaultProxyForRequest(Uri resource)
- {
- WebProxy proxy = (WebProxy) WebProxy.GetDefaultProxy();
-
- // See what proxy is used for resource.
- Uri resourceProxy = proxy.GetProxy(resource);
-
- // Test to see whether a proxy was selected.
- if (resourceProxy == resource)
- {
- Console.WriteLine("No proxy for {0}", resource);
- }
- else
- {
- Console.WriteLine("Proxy for {0} is {1}", resource.ToString(),
- resourceProxy.ToString());
- }
- }
-//
-
//
public static WebProxy CreateProxyAndCheckBypass(bool bypassLocal)
{
diff --git a/snippets/csharp/System.Reflection.Emit/FieldBuilder/SetMarshal/Project.csproj b/snippets/csharp/System.Reflection.Emit/FieldBuilder/SetMarshal/Project.csproj
deleted file mode 100644
index d6596077e1a..00000000000
--- a/snippets/csharp/System.Reflection.Emit/FieldBuilder/SetMarshal/Project.csproj
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
- Library
- net48
-
-
-
diff --git a/snippets/csharp/System.Reflection.Emit/MethodBuilder/SetMarshal/Project.csproj b/snippets/csharp/System.Reflection.Emit/MethodBuilder/SetMarshal/Project.csproj
deleted file mode 100644
index d6596077e1a..00000000000
--- a/snippets/csharp/System.Reflection.Emit/MethodBuilder/SetMarshal/Project.csproj
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
- Library
- net48
-
-
-
diff --git a/snippets/csharp/System.Reflection.Emit/MethodBuilder/SetMarshal/source.cs b/snippets/csharp/System.Reflection.Emit/MethodBuilder/SetMarshal/source.cs
deleted file mode 100644
index b9d0c4f1521..00000000000
--- a/snippets/csharp/System.Reflection.Emit/MethodBuilder/SetMarshal/source.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System;
-using System.Reflection;
-using System.Reflection.Emit;
-
-class VariousMethodBuilderSnippets {
-
- public static void ContainerMethod(TypeBuilder myDynamicType) {
-
- //
-
- MethodBuilder myMethod = myDynamicType.DefineMethod("MyMethodReturnsMarshal",
- MethodAttributes.Public,
- typeof(uint),
- new Type[] { typeof(string) });
-
- // We want the return value of our dynamic method to be marshalled as
- // an 64-bit (8-byte) signed integer, instead of the default 32-bit
- // unsigned int as specified above. The UnmanagedMarshal class can perform
- // the type conversion.
-
- UnmanagedMarshal marshalMeAsI8 = UnmanagedMarshal.DefineUnmanagedMarshal(
- System.Runtime.InteropServices.UnmanagedType.I8);
-
- myMethod.SetMarshal(marshalMeAsI8);
-
- //
- }
-}
diff --git a/snippets/csharp/System.Runtime.InteropServices/Marshal/Overview/Marshal.cs b/snippets/csharp/System.Runtime.InteropServices/Marshal/Overview/Marshal.cs
index aa3ca80284d..7947c0ed63c 100644
--- a/snippets/csharp/System.Runtime.InteropServices/Marshal/Overview/Marshal.cs
+++ b/snippets/csharp/System.Runtime.InteropServices/Marshal/Overview/Marshal.cs
@@ -17,16 +17,7 @@ static void Main()
// Demonstrate the use of public static fields of the Marshal class.
Console.WriteLine("SystemDefaultCharSize={0}, SystemMaxDBCSCharSize={1}",
Marshal.SystemDefaultCharSize, Marshal.SystemMaxDBCSCharSize);
- //
-
- //
- // Demonstrate the use of the SizeOf method of the Marshal class.
- Console.WriteLine("Number of bytes needed by a Point object: {0}",
- Marshal.SizeOf(typeof(Point)));
- Point p = new Point();
- Console.WriteLine("Number of bytes needed by a Point object: {0}",
- Marshal.SizeOf(p));
- //
+ //
//
// Demonstrate how to call GlobalAlloc and
@@ -56,7 +47,5 @@ static void Main()
// This code produces the following output.
//
// SystemDefaultCharSize=2, SystemMaxDBCSCharSize=1
-// Number of bytes needed by a Point object: 8
-// Number of bytes needed by a Point object: 8
// CloseHandle call failed with an error code of: 6
-//
\ No newline at end of file
+//
diff --git a/snippets/csharp/System.Runtime.InteropServices/Marshal/PtrToStructure/Project.csproj b/snippets/csharp/System.Runtime.InteropServices/Marshal/PtrToStructure/Project.csproj
deleted file mode 100644
index c02dc5044e7..00000000000
--- a/snippets/csharp/System.Runtime.InteropServices/Marshal/PtrToStructure/Project.csproj
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
- Library
- net6.0
-
-
-
\ No newline at end of file
diff --git a/snippets/csharp/System.Runtime.InteropServices/Marshal/PtrToStructure/pts.cs b/snippets/csharp/System.Runtime.InteropServices/Marshal/PtrToStructure/pts.cs
deleted file mode 100644
index 72500fd9c5f..00000000000
--- a/snippets/csharp/System.Runtime.InteropServices/Marshal/PtrToStructure/pts.cs
+++ /dev/null
@@ -1,90 +0,0 @@
-using System;
-
-using System.Runtime.InteropServices;
-namespace Testing
-
-{
-
- class Class1
-
- {
- //
-
- [StructLayout(LayoutKind.Sequential)]
-
- public class INNER
-
- {
-
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
-
- public string field1 = "Test";
- }
-
- [StructLayout(LayoutKind.Sequential)]
-
- public struct OUTER
-
- {
-
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 10)]
-
- public string field1;
-
- [MarshalAs(UnmanagedType.ByValArray, SizeConst = 100)]
-
- public byte[] inner;
- }
- [DllImport(@"SomeTestDLL.dll")]
-
- public static extern void CallTest( ref OUTER po);
- static void Main(string[] args)
-
- {
-
- OUTER ed = new OUTER();
-
- INNER[] inn=new INNER[10];
-
- INNER test = new INNER();
-
- int iStructSize = Marshal.SizeOf(test);
- int sz =inn.Length * iStructSize;
-
- ed.inner = new byte[sz];
- try
-
- {
-
- CallTest( ref ed);
- }
-
- catch(Exception e)
-
- {
-
- Console.WriteLine(e.Message);
- }
-
- IntPtr buffer = Marshal.AllocCoTaskMem(iStructSize*10);
-
- Marshal.Copy(ed.inner,0,buffer,iStructSize*10);
- int iCurOffset = 0;
-
- for(int i=0;i<10;i++)
-
- {
- inn[i] = (INNER)Marshal.PtrToStructure(new
-IntPtr(buffer.ToInt32()+iCurOffset),typeof(INNER) );
-
- iCurOffset += iStructSize;
- }
-
- Console.WriteLine(ed.field1);
-
- Marshal.FreeCoTaskMem(buffer);
- }
- //
- }
-}
-
diff --git a/snippets/csharp/System.Runtime.InteropServices/Marshal/PtrToStructure/sample.cs b/snippets/csharp/System.Runtime.InteropServices/Marshal/PtrToStructure/sample.cs
deleted file mode 100644
index cb0ca7dbb87..00000000000
--- a/snippets/csharp/System.Runtime.InteropServices/Marshal/PtrToStructure/sample.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-//
-using System;
-using System.Runtime.InteropServices;
-
-public struct Point
-{
- public int x;
- public int y;
-}
-
-class Example
-{
-
- static void Main()
- {
-
- // Create a point struct.
- Point p;
- p.x = 1;
- p.y = 1;
-
- Console.WriteLine("The value of first point is " + p.x + " and " + p.y + ".");
-
- // Initialize unmanged memory to hold the struct.
- IntPtr pnt = Marshal.AllocHGlobal(Marshal.SizeOf(p));
-
- try
- {
-
- // Copy the struct to unmanaged memory.
- Marshal.StructureToPtr(p, pnt, false);
-
- // Create another point.
- Point anotherP;
-
- // Set this Point to the value of the
- // Point in unmanaged memory.
- anotherP = (Point)Marshal.PtrToStructure(pnt, typeof(Point));
-
- Console.WriteLine("The value of new point is " + anotherP.x + " and " + anotherP.y + ".");
- }
- finally
- {
- // Free the unmanaged memory.
- Marshal.FreeHGlobal(pnt);
- }
- }
-}
-//
\ No newline at end of file
diff --git a/snippets/csharp/System.Runtime.Remoting.Channels/ChannelServices/RegisterChannel/server.cs b/snippets/csharp/System.Runtime.Remoting.Channels/ChannelServices/RegisterChannel/server.cs
deleted file mode 100644
index 7716ade8c8d..00000000000
--- a/snippets/csharp/System.Runtime.Remoting.Channels/ChannelServices/RegisterChannel/server.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System;
-using System.Runtime.Remoting;
-using System.Runtime.Remoting.Channels;
-using System.Runtime.Remoting.Channels.Tcp;
-using System.Runtime.Remoting.Channels.Http;
-using System.Runtime.Remoting.Lifetime;
-using SampleNamespace;
-
-// This assembly contains a remote service and its server host wrapped together.
-public class SampleServer {
- public static void Main() {
-
- // The following sample uses an HttpChannel constructor
- // to create a new HttpChannel that will listen on port 9000.
- // System.Runtime.Remoting.Channels.Http.HttpChannel.HttpChannel(int)
- // System.Runtime.Remoting.Channels.Http.HttpChannel
- //
- HttpChannel channel = new HttpChannel(9000);
- ChannelServices.RegisterChannel(channel);
-
- RemotingConfiguration.RegisterWellKnownServiceType( typeof(SampleService),
- "MySampleService/SampleService.soap", WellKnownObjectMode.Singleton);
-
- Console.WriteLine("** Press enter to end the server process. **");
- Console.ReadLine();
- //
- }
-}
diff --git a/snippets/csharp/System.Runtime.Remoting/RemotingConfiguration/Configure/makefile b/snippets/csharp/System.Runtime.Remoting/RemotingConfiguration/Configure/makefile
deleted file mode 100644
index 36abb5f655c..00000000000
--- a/snippets/csharp/System.Runtime.Remoting/RemotingConfiguration/Configure/makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-all : RemotingConfiguration_Configure_server.exe RemotingConfiguration_Configure_client.exe RemotingConfiguration_Configure_shared.dll
-
-RemotingConfiguration_Configure_shared.dll : RemotingConfiguration_Configure_shared.cs
- csc /debug+ /nologo /t:library RemotingConfiguration_Configure_shared.cs
-
-RemotingConfiguration_Configure_server.exe : RemotingConfiguration_Configure_server.cs RemotingConfiguration_Configure_shared.dll
- csc /debug+ /nologo /r:RemotingConfiguration_Configure_shared.dll RemotingConfiguration_Configure_server.cs
-
-RemotingConfiguration_Configure_client.exe : RemotingConfiguration_Configure_client.cs RemotingConfiguration_Configure_shared.dll
- csc /debug+ /nologo /r:RemotingConfiguration_Configure_shared.dll RemotingConfiguration_Configure_client.cs
-
diff --git a/snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetIssuerName/Project.csproj b/snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetIssuerName/Project.csproj
deleted file mode 100644
index c02dc5044e7..00000000000
--- a/snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetIssuerName/Project.csproj
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
- Library
- net6.0
-
-
-
\ No newline at end of file
diff --git a/snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetIssuerName/example.cs b/snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetIssuerName/example.cs
deleted file mode 100644
index e409c5f4b38..00000000000
--- a/snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetIssuerName/example.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-using System;
-using System.Security.Cryptography.X509Certificates;
-
-public class X509
-{
- public static void Main()
- {
- // The path to the certificate.
- string Certificate = "Certificate.cer";
-
- // Load the certificate into an X509Certificate object.
- X509Certificate cert = X509Certificate.CreateFromCertFile(Certificate);
-
- // Get the value.
- string results = cert.GetIssuerName();
-
- // Display the value to the console.
- Console.WriteLine(results);
- }
-}
-//
\ No newline at end of file
diff --git a/snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetName/Project.csproj b/snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetName/Project.csproj
deleted file mode 100644
index c02dc5044e7..00000000000
--- a/snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetName/Project.csproj
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
- Library
- net6.0
-
-
-
\ No newline at end of file
diff --git a/snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetName/example.cs b/snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetName/example.cs
deleted file mode 100644
index 53e3ca1b270..00000000000
--- a/snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetName/example.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-
-using System;
-using System.Security.Cryptography.X509Certificates;
-
-public class X509
-{
-
- public static void Main()
- {
-
- // The path to the certificate.
- string Certificate = "Certificate.cer";
-
- // Load the certificate into an X509Certificate object.
- X509Certificate cert = X509Certificate.CreateFromCertFile(Certificate);
-
- // Get the value.
- string results = cert.GetName();
-
- // Display the value to the console.
- Console.WriteLine(results);
- }
-}
-//
\ No newline at end of file
diff --git a/snippets/csharp/System.Security.Policy/Evidence/Overview/Project.csproj b/snippets/csharp/System.Security.Policy/Evidence/Overview/Project.csproj
deleted file mode 100644
index a62a59dbaa3..00000000000
--- a/snippets/csharp/System.Security.Policy/Evidence/Overview/Project.csproj
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
- Library
- net472
- true
-
-
-
diff --git a/snippets/csharp/System.Security.Policy/PolicyStatement/Overview/Project.csproj b/snippets/csharp/System.Security.Policy/PolicyStatement/Overview/Project.csproj
deleted file mode 100644
index a62a59dbaa3..00000000000
--- a/snippets/csharp/System.Security.Policy/PolicyStatement/Overview/Project.csproj
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
- Library
- net472
- true
-
-
-
diff --git a/snippets/csharp/System.Security.Policy/PolicyStatement/Overview/members.cs b/snippets/csharp/System.Security.Policy/PolicyStatement/Overview/members.cs
deleted file mode 100644
index 930bd091e7d..00000000000
--- a/snippets/csharp/System.Security.Policy/PolicyStatement/Overview/members.cs
+++ /dev/null
@@ -1,211 +0,0 @@
-// This sample demonstrates how to use each member of the PolicyStatement
-// class.
-//
-using System;
-using System.Security;
-using System.Security.Policy;
-using System.Security.Principal;
-using System.Security.Permissions;
-
-class Members
-{
- [STAThread]
- static void Main(string[] args)
- {
- // Create two new policy statements.
- PolicyStatement policyStatement = firstConstructorTest();
- PolicyStatement policyStatement2 = secondConstructorTest();
-
- // Add attributes to the first policy statement.
- //
- policyStatement.Attributes = PolicyStatementAttribute.All;
- //
-
- // Create a copy of the first policy statement.
- PolicyStatement policyStatementCopy = createCopy(policyStatement);
- addXmlMember(ref policyStatementCopy);
-
- summarizePolicyStatment(policyStatement);
- Console.WriteLine("This sample completed successfully; " +
- "press Enter to exit.");
- Console.ReadLine();
- }
-
- // Construct a PolicyStatement with an Unrestricted permission set.
- private static PolicyStatement firstConstructorTest()
- {
- // Construct the permission set.
- //
- PermissionSet permissions
- = new PermissionSet(PermissionState.Unrestricted);
- permissions.AddPermission(
- new SecurityPermission(SecurityPermissionFlag.Execution));
- permissions.AddPermission(
- new ZoneIdentityPermission(SecurityZone.MyComputer));
-
- // Create a policy statement based on the newly created permission
- // set.
- PolicyStatement policyStatement = new PolicyStatement(permissions);
- //
-
- return policyStatement;
- }
-
- // Construct a PolicyStatement with an Unrestricted permission set and
- // the LevelFinal attribute.
- private static PolicyStatement secondConstructorTest()
- {
- // Construct the permission set.
- //
- PermissionSet permissions =
- new PermissionSet(PermissionState.Unrestricted);
- permissions.AddPermission(
- new SecurityPermission(SecurityPermissionFlag.Execution));
- permissions.AddPermission(
- new ZoneIdentityPermission(SecurityZone.MyComputer));
-
- PolicyStatementAttribute levelFinalAttribute =
- PolicyStatementAttribute.LevelFinal;
-
- // Create a new policy statement with the specified permission set.
- // The LevelFinal attribute is set to prevent the evaluation of lower
- // policy levels in a resolve operation.
- PolicyStatement policyStatement =
- new PolicyStatement(permissions, levelFinalAttribute);
- //
-
- return policyStatement;
- }
-
- // Add a named permission set to the specified PolicyStatement.
- private static void AddPermissions(ref PolicyStatement policyStatement)
- {
- // Construct a NamedPermissionSet with basic permissions.
- //
- NamedPermissionSet allPerms = new NamedPermissionSet("allPerms");
- allPerms.AddPermission(
- new SecurityPermission(SecurityPermissionFlag.Execution));
- allPerms.AddPermission(
- new ZoneIdentityPermission(SecurityZone.MyComputer));
- allPerms.AddPermission(
- new SiteIdentityPermission("www.contoso.com"));
-
- policyStatement.PermissionSet = allPerms;
- //
- }
-
- // If a class attribute is not found in the specified PolicyStatement,
- // add a child XML element with an added class attribute.
- private static void addXmlMember(ref PolicyStatement policyStatement)
- {
- //
- SecurityElement xmlElement = policyStatement.ToXml();
- //
- if (xmlElement.Attribute("class") == null)
- {
- //
- SecurityElement newElement =
- new SecurityElement("PolicyStatement");
- newElement.AddAttribute("class", policyStatement.ToString());
- newElement.AddAttribute("version","1.1");
-
- newElement.AddChild(new SecurityElement("PermissionSet"));
-
- policyStatement.FromXml(newElement);
- //
-
- Console.Write("Added the class attribute and modified its ");
- Console.WriteLine("version number.\n" + newElement.ToString());
- }
- }
-
- // Verify that the type of the specified object is a PolicyStatement type
- // then create a copy of the object.
- private static PolicyStatement createCopy(Object sourceObject)
- {
- PolicyStatement returnedStatement = new PolicyStatement(null);
- // Compare specified object type with the PolicyStatement type.
- //
- if (sourceObject.GetType().Equals(typeof(PolicyStatement)))
- //
- {
- returnedStatement = getCopy((PolicyStatement)sourceObject);
- }
- else
- {
- throw new ArgumentException("Expected the PolicyStatement type.");
- }
-
- return returnedStatement;
- }
-
- // Return a copy of the specified PolicyStatement if the result of the
- // Copy command is an equivalent object. Otherwise, return the
- // original PolicyStatement object.
- private static PolicyStatement getCopy(PolicyStatement policyStatement)
- {
- // Create an equivalent copy of the policy statement.
- //
- PolicyStatement policyStatementCopy = policyStatement.Copy();
- //
-
- // Compare the specified objects for equality.
- //
- if (!policyStatementCopy.Equals(policyStatement))
- //
- {
- return policyStatementCopy;
- }
- else
- {
- return policyStatement;
- }
- }
-
- // Summarize the attributes of the specified PolicyStatement on the
- // console window.
- private static void summarizePolicyStatment(
- PolicyStatement policyStatement)
- {
- // Retrieve the class path for policyStatement.
- //
- string policyStatementClass = policyStatement.ToString();
- //
-
- //
- int hashCode = policyStatement.GetHashCode();
- //
-
- string attributeString = "";
- // Retrieve the string representation of the PolicyStatement
- // attributes.
- //
- if (policyStatement.AttributeString != null)
- {
- attributeString = policyStatement.AttributeString;
- }
- //
-
- // Write a summary to the console window.
- Console.WriteLine("\n*** " + policyStatementClass + " summary ***");
- Console.Write("This PolicyStatement has been created with hash ");
- Console.Write("code(" + hashCode + ") ");
-
- Console.Write("and contains the following attributes: ");
- Console.WriteLine(attributeString);
- }
-}
-//
-// This sample produces the following output:
-//
-// Added the class attribute and modified the version number.
-//
-//
-//
-//
-// *** System.Security.Policy.PolicyStatement summary ***
-// PolicyStatement has been created with hash code(20) containing the
-// following attributes: Exclusive LevelFinal
-// This sample completed successfully; press Enter to exit.
-//
\ No newline at end of file
diff --git a/snippets/csharp/System.Threading/ApartmentState/Overview/ApartmentExample.csproj b/snippets/csharp/System.Threading/ApartmentState/Overview/ApartmentExample.csproj
deleted file mode 100644
index 8371b4c6b1d..00000000000
--- a/snippets/csharp/System.Threading/ApartmentState/Overview/ApartmentExample.csproj
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
- Exe
- net48
- ApartmentTest
-
-
-
\ No newline at end of file
diff --git a/snippets/csharp/System.Windows.Forms/Form/Closing/form1.cs b/snippets/csharp/System.Windows.Forms/Form/Closing/form1.cs
deleted file mode 100644
index 21493ddf1a3..00000000000
--- a/snippets/csharp/System.Windows.Forms/Form/Closing/form1.cs
+++ /dev/null
@@ -1,115 +0,0 @@
-using System;
-using System.Drawing;
-using System.Collections;
-using System.ComponentModel;
-using System.Windows.Forms;
-using System.Data;
-
-namespace FormClosingEx
-{
- ///
- /// Summary description for Form1.
- ///
- public class Form1 : System.Windows.Forms.Form
- {
- private string strMyOriginalText = "";
- private System.Windows.Forms.Button button1;
- private System.Windows.Forms.TextBox textBox1;
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.Container components = null;
-
- public Form1()
- {
- //
- // Required for Windows Form Designer support
- //
- InitializeComponent();
-
- //
- // TODO: Add any constructor code after InitializeComponent call
- //
- }
-
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if (components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
-
- #region Windows Form Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.button1 = new System.Windows.Forms.Button();
- this.textBox1 = new System.Windows.Forms.TextBox();
- this.SuspendLayout();
- //
- // button1
- //
- this.button1.Location = new System.Drawing.Point(200, 64);
- this.button1.Name = "button1";
- this.button1.TabIndex = 0;
- this.button1.Text = "button1";
- //
- // textBox1
- //
- this.textBox1.Location = new System.Drawing.Point(48, 64);
- this.textBox1.Name = "textBox1";
- this.textBox1.TabIndex = 1;
- this.textBox1.Text = "textBox1";
- //
- // Form1
- //
- this.ClientSize = new System.Drawing.Size(292, 266);
- this.Controls.AddRange(new System.Windows.Forms.Control[] {
- this.textBox1,
- this.button1});
- this.Name = "Form1";
- this.Text = "Form1";
- this.Closing += new System.ComponentModel.CancelEventHandler(this.Form1_Closing);
- this.ResumeLayout(false);
- }
- #endregion
-
- ///
- /// The main entry point for the application.
- ///
- [STAThread]
- static void Main()
- {
- Application.Run(new Form1());
- }
-
- //
- private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
- {
- // Determine if text has changed in the textbox by comparing to original text.
- if (textBox1.Text != strMyOriginalText)
- {
- // Display a MsgBox asking the user to save changes or abort.
- if(MessageBox.Show("Do you want to save changes to your text?", "My Application",
- MessageBoxButtons.YesNo) == DialogResult.Yes)
- {
- // Cancel the Closing event from closing the form.
- e.Cancel = true;
- // Call method to save file...
- }
- }
- }
- //
- }
-}
diff --git a/snippets/csharp/System.Windows.Media.Effects/BitmapEffect/CreateBitmapEffectOuter/RGBFilterBitmapEffect.cs b/snippets/csharp/System.Windows.Media.Effects/BitmapEffect/CreateBitmapEffectOuter/RGBFilterBitmapEffect.cs
deleted file mode 100644
index 07c0506d496..00000000000
--- a/snippets/csharp/System.Windows.Media.Effects/BitmapEffect/CreateBitmapEffectOuter/RGBFilterBitmapEffect.cs
+++ /dev/null
@@ -1,199 +0,0 @@
-using System;
-using System.Windows;
-using System.Windows.Media;
-using System.Windows.Media.Effects;
-using System.Runtime.InteropServices;
-using Microsoft.Win32.SafeHandles;
-using System.Reflection;
-
-namespace RGBFilter
-{
- internal class COMSafeHandle : SafeHandleZeroOrMinusOneIsInvalid
- {
- internal COMSafeHandle()
- : base(true)
- {
- }
-
- protected override bool ReleaseHandle()
- {
- Marshal.Release(handle);
- return true;
- }
- }
-
- public class Ole32Methods
- {
- [DllImport("ole32.dll")]
- internal static extern uint /* HRESULT */ CoCreateInstance(
- ref Guid clsid,
- IntPtr inner,
- uint context,
- ref Guid uuid,
- out COMSafeHandle ppEffect);
- }
-
- //
- public class RGBFilterBitmapEffect : BitmapEffect
- {
- //
- unsafe protected override SafeHandle CreateUnmanagedEffect()
- {
- const uint CLSCTX_INPROC_SERVER = 1;
- Guid IID_IUnknown = new Guid("00000000-0000-0000-C000-000000000046");
- Guid guidEffectCLSID = new Guid("84CF07CC-34C4-460f-B435-3184F5F2FF2A");
- SafeHandle wrapper = BitmapEffect.CreateBitmapEffectOuter();
-
- COMSafeHandle unmanagedEffect;
- uint hresult = Ole32Methods.CoCreateInstance(
- ref guidEffectCLSID,
- wrapper.DangerousGetHandle(),
- CLSCTX_INPROC_SERVER,
- ref IID_IUnknown,
- out unmanagedEffect);
- InitializeBitmapEffect(wrapper, unmanagedEffect);
- if (0 == hresult) return wrapper;
- throw new Exception("Cannot instantiate effect. HRESULT = " + hresult.ToString());
- }
- //
-
- #region Public Methods
-
- public RGBFilterBitmapEffect()
- {
- }
-
- public new RGBFilterBitmapEffect Clone()
- {
- return (RGBFilterBitmapEffect)base.Clone();
- }
-
- public new RGBFilterBitmapEffect CloneCurrentValue()
- {
- return (RGBFilterBitmapEffect)base.CloneCurrentValue();
- }
-
- #endregion Public Methods
-
- #region Public Properties
- public double Red
- {
- get
- {
- return (double)GetValue(RedProperty);
- }
- set
- {
- SetValue(RedProperty, value);
- }
- }
-
- public double Green
- {
- get
- {
- return (double)GetValue(GreenProperty);
- }
- set
- {
- SetValue(GreenProperty, value);
- }
- }
-
- public double Blue
- {
- get
- {
- return (double)GetValue(BlueProperty);
- }
- set
- {
- SetValue(BlueProperty, value);
- }
- }
-
- public static readonly DependencyProperty RedProperty = DependencyProperty.Register(
- "Red",
- typeof(double),
- typeof(RGBFilterBitmapEffect),
- new PropertyMetadata(defaultRed, OnPropertyInvalidated));
-
- public static readonly DependencyProperty GreenProperty = DependencyProperty.Register(
- "Green",
- typeof(double),
- typeof(RGBFilterBitmapEffect),
- new PropertyMetadata(defaultGreen, OnPropertyInvalidated));
-
- public static readonly DependencyProperty BlueProperty = DependencyProperty.Register(
- "Blue",
- typeof(double),
- typeof(RGBFilterBitmapEffect),
- new PropertyMetadata(defaultBlue, OnPropertyInvalidated));
-
- #endregion Public Properties
-
- #region Protected Methods
-
- protected override void UpdateUnmanagedPropertyState(SafeHandle unmanagedEffect)
- {
- BitmapEffect.SetValue(unmanagedEffect, "Red", this.Red);
- BitmapEffect.SetValue(unmanagedEffect, "Green", this.Green);
- BitmapEffect.SetValue(unmanagedEffect, "Blue", this.Blue);
- }
-
- protected override Freezable CreateInstanceCore()
- {
- return new RGBFilterBitmapEffect();
- }
-
- protected override void CloneCore(Freezable sourceFreezable)
- {
- RGBFilterBitmapEffect cycle =
- (RGBFilterBitmapEffect)sourceFreezable;
-
- base.CloneCore(sourceFreezable);
- Red = defaultRed;
- Green = defaultGreen;
- Blue = defaultBlue;
- }
- protected override void GetCurrentValueAsFrozenCore(Freezable sourceFreezable)
- {
- RGBFilterBitmapEffect cycle = (RGBFilterBitmapEffect)sourceFreezable;
-
- base.GetCurrentValueAsFrozenCore(sourceFreezable);
-
- Red = defaultRed;
- Green = defaultGreen;
- Blue = defaultBlue;
- }
-
- protected override void CloneCurrentValueCore(Freezable sourceAnimatable)
- {
- RGBFilterBitmapEffect sourceRGBFilterBitmapEffect = (RGBFilterBitmapEffect)sourceAnimatable;
-
- sourceRGBFilterBitmapEffect = this;
-
- base.CloneCurrentValueCore(sourceAnimatable);
-
- Red = sourceRGBFilterBitmapEffect.Red;
- Green = sourceRGBFilterBitmapEffect.Green;
- Blue = sourceRGBFilterBitmapEffect.Blue;
- }
- #endregion ProtectedMethods
-
- private static void OnPropertyInvalidated(DependencyObject d, DependencyPropertyChangedEventArgs e)
- {
- if (((double)e.NewValue) > 1.0 || ((double)e.NewValue) < -1.0)
- throw new ArgumentOutOfRangeException("Red","Property value must be between -1 and 1.");
- else
- ((RGBFilterBitmapEffect)d).OnChanged();
- }
-
- #region Internal Fields
- internal const double defaultRed = 0x0;
- internal const double defaultGreen = 0x0;
- internal const double defaultBlue = 0x0;
- #endregion Internal Fields
- }
- //
-}
diff --git a/snippets/csharp/System.Windows.Media.Effects/BitmapEffect/CreateBitmapEffectOuter/RGBFilterBitmapEffect.csproj b/snippets/csharp/System.Windows.Media.Effects/BitmapEffect/CreateBitmapEffectOuter/RGBFilterBitmapEffect.csproj
deleted file mode 100644
index 1eda573223e..00000000000
--- a/snippets/csharp/System.Windows.Media.Effects/BitmapEffect/CreateBitmapEffectOuter/RGBFilterBitmapEffect.csproj
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
- Debug
- AnyCPU
- {9CD91C99-0FED-435F-88DF-3E8F725EB704}
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- RGBFilterBitmapEffect
- ManagedRGBFilterBitmapEffect
- 4
- library
- 1.0.0.*
-
- v4.8
-
-
- 10.0.20821
-
-
- true
- full
- false
- .\bin\Debug\
- DEBUG;TRACE
- true
- false
-
-
- false
- true
- .\bin\Release\
- TRACE
- true
- false
-
-
-
-
-
-
-
-
-
- 4.0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/snippets/csharp/System.Windows.Media/DrawingContext/Overview/PushEffectExample.cs b/snippets/csharp/System.Windows.Media/DrawingContext/Overview/PushEffectExample.cs
index 42fbe4fc5bb..38f242965dd 100644
--- a/snippets/csharp/System.Windows.Media/DrawingContext/Overview/PushEffectExample.cs
+++ b/snippets/csharp/System.Windows.Media/DrawingContext/Overview/PushEffectExample.cs
@@ -1,10 +1,7 @@
//
-using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Navigation;
using System.Windows.Media.Effects;
namespace SDKSample
@@ -35,21 +32,6 @@ public PushEffectExample()
// This rectangle is drawn at 50% opacity.
dc.DrawRectangle(Brushes.Blue, shapeOutlinePen, new Rect(25, 25, 25, 25));
-
- // Blurs subsquent drawings.
- dc.PushEffect(new BlurBitmapEffect(), null);
-
- // This rectangle is blurred and drawn at 50% opacity (0.5 x 0.5).
- dc.DrawRectangle(Brushes.Blue, shapeOutlinePen, new Rect(50, 50, 25, 25));
-
- // This rectangle is also blurred and drawn at 50% opacity.
- dc.DrawRectangle(Brushes.Blue, shapeOutlinePen, new Rect(75, 75, 25, 25));
-
- // Stop applying the blur to subsquent drawings.
- dc.Pop();
-
- // This rectangle is drawn at 50% opacity with no blur effect.
- dc.DrawRectangle(Brushes.Blue, shapeOutlinePen, new Rect(100, 100, 25, 25));
}
// Display the drawing using an image control.
diff --git a/snippets/csharp/System.Windows/UIElement/BitmapEffect/blurcodebehindexample.xaml.cs b/snippets/csharp/System.Windows/UIElement/BitmapEffect/blurcodebehindexample.xaml.cs
index f3d04320232..a763a4ba9d9 100644
--- a/snippets/csharp/System.Windows/UIElement/BitmapEffect/blurcodebehindexample.xaml.cs
+++ b/snippets/csharp/System.Windows/UIElement/BitmapEffect/blurcodebehindexample.xaml.cs
@@ -30,13 +30,13 @@ void OnClickBlurButton(object sender, RoutedEventArgs args)
// to the Button.
BlurBitmapEffect myBlurEffect = new BlurBitmapEffect();
- // Set the Radius property of the blur. This determines how
+ // Set the Radius property of the blur. This determines how
// blurry the effect will be. The larger the radius, the more
- // blurring.
+ // blurring.
myBlurEffect.Radius = 10;
- // Set the KernelType property of the blur. A KernalType of "Box"
- // creates less blur than the Gaussian kernal type.
+ // Set the KernelType property of the blur. A KernelType of "Box"
+ // creates less blur than the Gaussian kernel type.
myBlurEffect.KernelType = KernelType.Box;
// Apply the bitmap effect to the Button.
@@ -46,4 +46,4 @@ void OnClickBlurButton(object sender, RoutedEventArgs args)
}
}
}
-//
\ No newline at end of file
+//
diff --git a/snippets/csharp/VS_Snippets_WebNet/HttpCapabilitiesBase.JavaScript/CS/sample_cs.aspx b/snippets/csharp/VS_Snippets_WebNet/HttpCapabilitiesBase.JavaScript/CS/sample_cs.aspx
deleted file mode 100644
index 7734e7588df..00000000000
--- a/snippets/csharp/VS_Snippets_WebNet/HttpCapabilitiesBase.JavaScript/CS/sample_cs.aspx
+++ /dev/null
@@ -1,42 +0,0 @@
-
-<%@ page language="C#"%>
-
-
-
-
-
-
- Browser Capabilities Sample
-
-
-
-
-
-
\ No newline at end of file
diff --git a/snippets/csharp/VS_Snippets_WebNet/Page_GetPostBackEventReference/CS/page_getpostbackeventreference.cs b/snippets/csharp/VS_Snippets_WebNet/Page_GetPostBackEventReference/CS/page_getpostbackeventreference.cs
deleted file mode 100644
index b2a02859247..00000000000
--- a/snippets/csharp/VS_Snippets_WebNet/Page_GetPostBackEventReference/CS/page_getpostbackeventreference.cs
+++ /dev/null
@@ -1,108 +0,0 @@
-using System;
-using System.Web;
-using System.Web.UI;
-
-namespace MyASPNETControls
-{
-//
- public class MyControl : Control, IPostBackEventHandler
- {
-
- // Create an integer property that is displayed when
- // the page that contains this control is requested
- // and save it to the control's ViewState property.
- public int Number
- {
- get
- {
- if ( ViewState["Number"] !=null )
- return (int) ViewState["Number"];
- return 50;
- }
-
- set
- {
- ViewState["Number"] = value;
- }
- }
-
- // Implement the RaisePostBackEvent method from the
- // IPostBackEventHandler interface. If 'inc' is passed
- // to this method, it increases the Number property by one.
- // If 'dec' is passed to this method, it decreases the
- // Number property by one.
- public void RaisePostBackEvent(string eventArgument)
- {
- if ( eventArgument == "inc" )
- Number = Number + 1;
-
- if ( eventArgument == "dec" )
- Number = Number - 1;
- }
-
-[System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Demand, Name="FullTrust")]
- protected override void Render(HtmlTextWriter writer)
- {
- // Converts the Number property to a string and
- // writes it to the containing page.
- writer.Write("The Number is " + Number.ToString() + " (" );
-
- // Uses the GetPostBackEventReference method to pass
- // 'inc' to the RaisePostBackEvent method when the link
- // this code creates is clicked.
- writer.Write("Increase Number");
-
- writer.Write(" or ");
-
- // Uses the GetPostBackEventReference method to pass
- // 'dec' to the RaisePostBackEvent method when the link
- // this code creates is clicked.
- writer.Write("Decrease Number");
- }
- }
-//
-
-//
- public class MyControl1 : Control, IPostBackEventHandler
- {
- // Create an integer property that is displayed when
- // the page that contains this control is requested
- // and save it to the control's ViewState property.
- public int Number
- {
- get
- {
- if ( ViewState["Number"] !=null )
- return (int) ViewState["Number"];
- return 50;
- }
-
- set
- {
- ViewState["Number"] = value;
- }
- }
-
- // Implement the RaisePostBackEvent method from the
- // IPostBackEventHandler interface. If 'inc' is passed
- // to this method, it increases the Number property by one.
- public void RaisePostBackEvent(string eventArgument)
- {
- Number = Number + 1;
- }
-
-[System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Demand, Name="FullTrust")]
- protected override void Render(HtmlTextWriter writer)
- {
- // Converts the Number property to a string and
- // writes it to the containing page.
- writer.Write("The Number is " + Number.ToString() + " (" );
-
- // Uses the GetPostBackEventReference method to pass
- // 'inc' to the RaisePostBackEvent method when the link
- // this code creates is clicked.
- writer.Write("Increase Number");
- }
- }
-//
-}
\ No newline at end of file
diff --git a/snippets/csharp/VS_Snippets_WebNet/Page_RegisterArrayDeclaration/CS/page_registerarraydeclaration.cs.aspx b/snippets/csharp/VS_Snippets_WebNet/Page_RegisterArrayDeclaration/CS/page_registerarraydeclaration.cs.aspx
deleted file mode 100644
index 1c6151e483f..00000000000
--- a/snippets/csharp/VS_Snippets_WebNet/Page_RegisterArrayDeclaration/CS/page_registerarraydeclaration.cs.aspx
+++ /dev/null
@@ -1,44 +0,0 @@
-<%--
- The following program demonstrates the 'RegisterArrayDeclaration' method of 'Page' class.
-
- The program declares and initializes an array of script based objects.When the button click event
- occurs the client side script loops through the array and executes a method on each of these
- instances to display the names given to them.
---%>
-
-
-
-
-
- " + a.name + "
-
-
-
-
-
diff --git a/snippets/csharp/VS_Snippets_WebNet/Page_RegisterHiddenField/CS/page_registerhiddenfield.cs.aspx b/snippets/csharp/VS_Snippets_WebNet/Page_RegisterHiddenField/CS/page_registerhiddenfield.cs.aspx
deleted file mode 100644
index 30365f8de9b..00000000000
--- a/snippets/csharp/VS_Snippets_WebNet/Page_RegisterHiddenField/CS/page_registerhiddenfield.cs.aspx
+++ /dev/null
@@ -1,42 +0,0 @@
-<%--
- The following program demonstrates the 'RegisterHiddenField' and
- 'RegisterOnSubmitStatement methods of 'Page' class.
-
- The program forms a client side script for hidden field and submit button and a
- script which display the content of hidden field when page load event occurs.
- Prints hidden field value and a message.
---%>
-
-
-
-
- ' + myForm.myHiddenField.value+ '
-
-
-
-
-
diff --git a/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.AuthenticationSection/CS/authenticationsection.cs b/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.AuthenticationSection/CS/authenticationsection.cs
index 3f872563955..b92d3557043 100644
--- a/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.AuthenticationSection/CS/authenticationsection.cs
+++ b/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.AuthenticationSection/CS/authenticationsection.cs
@@ -25,15 +25,6 @@ public static void Main()
new AuthenticationSection();
//
- //
- // Get the current Passport property.
- PassportAuthentication currentPassport =
- authenticationSection.Passport;
-
- // Get the Passport redirect URL.
- string passRedirectUrl = currentPassport.RedirectUrl;
- //
-
//
// Get the current Mode property.
AuthenticationMode currentMode =
diff --git a/snippets/fsharp/System.Threading/ApartmentState/Overview/fs.fsproj b/snippets/fsharp/System.Threading/ApartmentState/Overview/fs.fsproj
deleted file mode 100644
index 5e8d1072c29..00000000000
--- a/snippets/fsharp/System.Threading/ApartmentState/Overview/fs.fsproj
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- Exe
- net7.0
-
-
-
-
-
-
\ No newline at end of file
diff --git a/snippets/fsharp/System.Threading/ApartmentState/Overview/source.fs b/snippets/fsharp/System.Threading/ApartmentState/Overview/source.fs
deleted file mode 100644
index 1eef849d955..00000000000
--- a/snippets/fsharp/System.Threading/ApartmentState/Overview/source.fs
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-open System.Threading
-
-let threadMethod () = Thread.Sleep 1000
-
-let newThread = Thread threadMethod
-newThread.SetApartmentState ApartmentState.MTA
-
-printfn $"ThreadState: {newThread.ThreadState}, ApartmentState: {newThread.GetApartmentState()}"
-
-newThread.Start()
-
-// Wait for newThread to start and go to sleep.
-Thread.Sleep 300
-
-try
- // This causes an exception since newThread is sleeping.
- newThread.SetApartmentState ApartmentState.STA
-
-with :? ThreadStateException as stateException ->
- printfn $"\n{stateException.GetType().Name} caught:\nThread is not in the Unstarted or Running state."
- printfn $"ThreadState: {newThread.ThreadState}, ApartmentState: {newThread.GetApartmentState()}"
-//
diff --git a/snippets/visualbasic/System.Net.Sockets/TcpListener/.ctor/source.vb b/snippets/visualbasic/System.Net.Sockets/TcpListener/.ctor/source.vb
index dc66de96ab8..c426f46647b 100644
--- a/snippets/visualbasic/System.Net.Sockets/TcpListener/.ctor/source.vb
+++ b/snippets/visualbasic/System.Net.Sockets/TcpListener/.ctor/source.vb
@@ -7,25 +7,25 @@ Imports System.Threading
_
Public Class MyTcpListenerExample
-
+
'Entry point which delegates to C-style main Private Function
Public Overloads Shared Sub Main()
System.Environment.ExitCode = Main(System.Environment.GetCommandLineArgs())
End Sub
-
+
Overloads Public Shared Function Main(args() As String) As Integer
If args.Length = 0
Console.WriteLine("Enter a selection")
return 0
End If
-
+
If args(0) = "endpointExample" Then
-
+
'
'Creates an instance of the TcpListener class by providing a local endpoint.
Dim ipAddress As IPAddress = Dns.Resolve(Dns.GetHostName()).AddressList(0)
Dim ipLocalEndPoint As New IPEndPoint(ipAddress, 11000)
-
+
Try
Dim tcpListener As New TcpListener(ipLocalEndPoint)
Catch e As Exception
@@ -34,66 +34,51 @@ Public Class MyTcpListenerExample
'
Else
If args(0) = "ipAddressExample" Then
-
+
'
'Creates an instance of the TcpListener class by providing a local IP address and port number.
Dim ipAddress As IPAddress = Dns.Resolve("localhost").AddressList(0)
-
+
Try
Dim tcpListener As New TcpListener(ipAddress, 13)
Catch e As Exception
Console.WriteLine(e.ToString())
End Try
-
+
'
Else
- If args(0) = "portNumberExample" Then
-
- '
- 'Creates an instance of the TcpListener class by providing a local port number.
- Dim ipAddress As IPAddress = Dns.Resolve("localhost").AddressList(0)
- Try
- Dim tcpListener As New TcpListener(ipAddress, 13)
- Catch e As Exception
- Console.WriteLine(e.ToString())
- End Try
-
- '
- Else
Dim ipAddress As IPAddress = Dns.Resolve("localhost").AddressList(0)
Dim tcpListener As New TcpListener(ipAddress, 13)
-
+
tcpListener.Start()
-
+
Console.WriteLine("Waiting for a connection....")
-
-
+
Try
'
' Accepts the pending client connection and returns a socket for communciation.
Dim socket As Socket = tcpListener.AcceptSocket()
Console.WriteLine("Connection accepted.")
-
+
Dim responseString As String = "You have successfully connected to me"
-
+
'Forms and sends a response string to the connected client.
Dim sendBytes As [Byte]() = Encoding.ASCII.GetBytes(responseString)
Dim i As Integer = socket.Send(sendBytes)
Console.WriteLine(("Message Sent /> : " + responseString))
- '
+ '
'Any communication with the remote client using the socket can go here.
-
+
'Closes the tcpListener and the socket.
socket.Shutdown(SocketShutdown.Both)
socket.Close()
tcpListener.Stop()
-
+
Catch e As Exception
Console.WriteLine(e.ToString())
End Try
- End If
End If
End If
Return 0
diff --git a/snippets/visualbasic/System.Reflection.Emit/MethodBuilder/SetMarshal/source.vb b/snippets/visualbasic/System.Reflection.Emit/MethodBuilder/SetMarshal/source.vb
deleted file mode 100644
index df96f2ad8f8..00000000000
--- a/snippets/visualbasic/System.Reflection.Emit/MethodBuilder/SetMarshal/source.vb
+++ /dev/null
@@ -1,31 +0,0 @@
-
-Imports System.Reflection
-Imports System.Reflection.Emit
-
- _
-
-Class VariousMethodBuilderSnippets
-
-
- Public Shared Sub ContainerMethod(myDynamicType As TypeBuilder)
-
- '
- Dim myMethod As MethodBuilder = myDynamicType.DefineMethod("MyMethodReturnsMarshal", _
- MethodAttributes.Public, GetType(System.UInt32), _
- New Type() {GetType(String)})
-
- ' We want the return value of our dynamic method to be marshalled as
- ' an 64-bit (8-byte) signed integer, instead of the default 32-bit
- ' unsigned int as specified above. The UnmanagedMarshal class can perform
- ' the type conversion.
-
- Dim marshalMeAsI8 As UnmanagedMarshal = UnmanagedMarshal.DefineUnmanagedMarshal( _
- System.Runtime.InteropServices.UnmanagedType.I8)
-
- myMethod.SetMarshal(marshalMeAsI8)
-
- '
-
- End Sub
-
-End Class
diff --git a/snippets/visualbasic/System.Runtime.InteropServices/Marshal/Overview/Marshal.vb b/snippets/visualbasic/System.Runtime.InteropServices/Marshal/Overview/Marshal.vb
index c46dc17fe61..1fea46dddb6 100644
--- a/snippets/visualbasic/System.Runtime.InteropServices/Marshal/Overview/Marshal.vb
+++ b/snippets/visualbasic/System.Runtime.InteropServices/Marshal/Overview/Marshal.vb
@@ -3,47 +3,37 @@ Imports System.Text
Imports System.Runtime.InteropServices
Imports System.Security.Permissions
-
-
Public Structure Point
Public x, y As Int32
End Structure
-
-
Public NotInheritable Class App
_
Shared Sub Main()
- '
+ '
' Demonstrate the use of public static fields of the Marshal class.
Console.WriteLine("SystemDefaultCharSize={0}, SystemMaxDBCSCharSize={1}", Marshal.SystemDefaultCharSize, Marshal.SystemMaxDBCSCharSize)
'
- '
- ' Demonstrate the use of the SizeOf method of the Marshal class.
- Console.WriteLine("Number of bytes needed by a Point object: {0}", Marshal.SizeOf(GetType(Point)))
- Dim p As New Point()
- Console.WriteLine("Number of bytes needed by a Point object: {0}", Marshal.SizeOf(p))
- '
+
'
- ' Demonstrate how to call GlobalAlloc and
+ ' Demonstrate how to call GlobalAlloc and
' GlobalFree using the Marshal class.
Dim hglobal As IntPtr = Marshal.AllocHGlobal(100)
Marshal.FreeHGlobal(hglobal)
'
+
'
- ' Demonstrate how to use the Marshal class to get the Win32 error
+ ' Demonstrate how to use the Marshal class to get the Win32 error
' code when a Win32 method fails.
Dim f As [Boolean] = CloseHandle(New IntPtr(-1))
If Not f Then
Console.WriteLine("CloseHandle call failed with an error code of: {0}", Marshal.GetLastWin32Error())
End If
-
End Sub
-
- ' This is a platform invoke prototype. SetLastError is true, which allows
- ' the GetLastWin32Error method of the Marshal class to work correctly.
+ ' This is a platform invoke prototype. SetLastError is true, which allows
+ ' the GetLastWin32Error method of the Marshal class to work correctly.
_
Shared Function CloseHandle(ByVal h As IntPtr) As [Boolean]
@@ -51,11 +41,8 @@ Public NotInheritable Class App
'
End Class
-
' This code produces the following output.
-'
+'
' SystemDefaultCharSize=2, SystemMaxDBCSCharSize=1
-' Number of bytes needed by a Point object: 8
-' Number of bytes needed by a Point object: 8
' CloseHandle call failed with an error code of: 6
-'
\ No newline at end of file
+'
diff --git a/snippets/visualbasic/System.Runtime.InteropServices/Marshal/PtrToStructure/sample.vb b/snippets/visualbasic/System.Runtime.InteropServices/Marshal/PtrToStructure/sample.vb
deleted file mode 100644
index 5d5fb008973..00000000000
--- a/snippets/visualbasic/System.Runtime.InteropServices/Marshal/PtrToStructure/sample.vb
+++ /dev/null
@@ -1,50 +0,0 @@
-'
-Imports System.Runtime.InteropServices
-
-
-
-Public Structure Point
- Public x As Integer
- Public y As Integer
-End Structure
-
-
-Module Example
-
-
- Sub Main()
-
- ' Create a point struct.
- Dim p As Point
- p.x = 1
- p.y = 1
-
- Console.WriteLine("The value of first point is " + p.x.ToString + " and " + p.y.ToString + ".")
-
- ' Initialize unmanged memory to hold the struct.
- Dim pnt As IntPtr = Marshal.AllocHGlobal(Marshal.SizeOf(p))
-
- Try
-
- ' Copy the struct to unmanaged memory.
- Marshal.StructureToPtr(p, pnt, False)
-
- ' Create another point.
- Dim anotherP As Point
-
- ' Set this Point to the value of the
- ' Point in unmanaged memory.
- anotherP = CType(Marshal.PtrToStructure(pnt, GetType(Point)), Point)
-
- Console.WriteLine("The value of new point is " + anotherP.x.ToString + " and " + anotherP.y.ToString + ".")
-
- Finally
- ' Free the unmanaged memory.
- Marshal.FreeHGlobal(pnt)
- End Try
-
- End Sub
-End Module
-
-
-'
\ No newline at end of file
diff --git a/snippets/visualbasic/System.Runtime.Remoting.Channels/ChannelServices/RegisterChannel/makefile b/snippets/visualbasic/System.Runtime.Remoting.Channels/ChannelServices/RegisterChannel/makefile
deleted file mode 100644
index 7c2c72f5cd8..00000000000
--- a/snippets/visualbasic/System.Runtime.Remoting.Channels/ChannelServices/RegisterChannel/makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-all: service.dll server.exe server2.exe client.exe client2.exe
-
-service.dll: service.vb
- vbc /t:library service.vb
-
-server.exe: server.vb service.dll
- vbc server.vb /r:service.dll
-
-server2.exe: server2.vb service.dll
- vbc server2.vb /r:service.dll
-
-client.exe: client.vb service.dll
- vbc client.vb /r:service.dll
-
-client2.exe: client2.vb service.dll
- vbc client2.vb /r:service.dll
\ No newline at end of file
diff --git a/snippets/visualbasic/System.Runtime.Remoting.Channels/ChannelServices/RegisterChannel/server.vb b/snippets/visualbasic/System.Runtime.Remoting.Channels/ChannelServices/RegisterChannel/server.vb
deleted file mode 100644
index cae864b9941..00000000000
--- a/snippets/visualbasic/System.Runtime.Remoting.Channels/ChannelServices/RegisterChannel/server.vb
+++ /dev/null
@@ -1,26 +0,0 @@
-
-Imports System.Runtime.Remoting
-Imports System.Runtime.Remoting.Channels
-Imports System.Runtime.Remoting.Channels.Tcp
-Imports System.Runtime.Remoting.Channels.Http
-Imports System.Runtime.Remoting.Lifetime
-Imports SampleNamespace
-
-' This assembly contains a remote service and its server host wrapped together.
-Public Class SampleServer
-
- Public Shared Sub Main()
- ' The following sample uses an HttpChannel constructor
- ' to create a new HttpChannel that will listen on port 9000.
- ' System.Runtime.Remoting.Channels.Http.HttpChannel.HttpChannel(int)
- ' System.Runtime.Remoting.Channels.Http.HttpChannel
- '
- Dim channel As New HttpChannel(9000)
- ChannelServices.RegisterChannel(channel)
- RemotingConfiguration.RegisterWellKnownServiceType(GetType(SampleService), "MySampleService/SampleService.soap", WellKnownObjectMode.Singleton)
-
- Console.WriteLine("** Press enter to end the server process. **")
- Console.ReadLine()
- '
- End Sub
-End Class
diff --git a/snippets/visualbasic/System.Runtime.Remoting/RemotingConfiguration/Configure/makefile b/snippets/visualbasic/System.Runtime.Remoting/RemotingConfiguration/Configure/makefile
deleted file mode 100644
index 06e96def465..00000000000
--- a/snippets/visualbasic/System.Runtime.Remoting/RemotingConfiguration/Configure/makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-all : RemotingConfiguration_Configure_server.exe RemotingConfiguration_Configure_client.exe RemotingConfiguration_Configure_shared.dll
-
-RemotingConfiguration_Configure_shared.dll : RemotingConfiguration_Configure_shared.vb
- vbc /debug+ /nologo /t:library RemotingConfiguration_Configure_shared.vb
-
-RemotingConfiguration_Configure_server.exe : RemotingConfiguration_Configure_server.vb RemotingConfiguration_Configure_shared.dll
- vbc /debug+ /nologo /r:RemotingConfiguration_Configure_shared.dll RemotingConfiguration_Configure_server.vb
-
-RemotingConfiguration_Configure_client.exe : RemotingConfiguration_Configure_client.vb RemotingConfiguration_Configure_shared.dll
- vbc /debug+ /nologo /r:RemotingConfiguration_Configure_shared.dll RemotingConfiguration_Configure_client.vb
-
diff --git a/snippets/visualbasic/System.Security.Cryptography.X509Certificates/X509Certificate/GetIssuerName/example.vb b/snippets/visualbasic/System.Security.Cryptography.X509Certificates/X509Certificate/GetIssuerName/example.vb
deleted file mode 100644
index 09c8ac7e996..00000000000
--- a/snippets/visualbasic/System.Security.Cryptography.X509Certificates/X509Certificate/GetIssuerName/example.vb
+++ /dev/null
@@ -1,26 +0,0 @@
- '
-Imports System.Security.Cryptography.X509Certificates
-
-
-
-
-Public Class X509
-
-
- Public Shared Sub Main()
-
- ' The path to the certificate.
- Dim Certificate As String = "Certificate.cer"
-
- ' Load the certificate into an X509Certificate object.
- Dim cert As X509Certificate = X509Certificate.CreateFromCertFile(Certificate)
-
- ' Get the value.
- Dim results As String = cert.GetIssuerName()
-
- ' Display the value to the console.
- Console.WriteLine(results)
- End Sub
-End Class
-
-'
\ No newline at end of file
diff --git a/snippets/visualbasic/System.Security.Cryptography.X509Certificates/X509Certificate/GetName/example.vb b/snippets/visualbasic/System.Security.Cryptography.X509Certificates/X509Certificate/GetName/example.vb
deleted file mode 100644
index fd9ef56cb3d..00000000000
--- a/snippets/visualbasic/System.Security.Cryptography.X509Certificates/X509Certificate/GetName/example.vb
+++ /dev/null
@@ -1,26 +0,0 @@
- '
-Imports System.Security.Cryptography.X509Certificates
-
-
-
-
-Public Class X509
-
-
- Public Shared Sub Main()
-
- ' The path to the certificate.
- Dim Certificate As String = "Certificate.cer"
-
- ' Load the certificate into an X509Certificate object.
- Dim cert As X509Certificate = X509Certificate.CreateFromCertFile(Certificate)
-
- ' Get the value.
- Dim results As String = cert.GetName()
-
- ' Display the value to the console.
- Console.WriteLine(results)
- End Sub
-End Class
-
-'
\ No newline at end of file
diff --git a/snippets/visualbasic/System.Security.Policy/PolicyStatement/Overview/Form1.vb b/snippets/visualbasic/System.Security.Policy/PolicyStatement/Overview/Form1.vb
deleted file mode 100644
index 4d5a2fef76d..00000000000
--- a/snippets/visualbasic/System.Security.Policy/PolicyStatement/Overview/Form1.vb
+++ /dev/null
@@ -1,338 +0,0 @@
-' This sample demonstrates how to call each member of the PolicyStatement
-' class.
-'
-Imports System.Security
-Imports System.Security.Policy
-Imports System.Security.Principal
-Imports System.Security.Permissions
-
-Public Class Form1
- Inherits System.Windows.Forms.Form
-
- ' Event handler for Run button.
- Private Sub Button1_Click( _
- ByVal sender As System.Object, _
- ByVal e As System.EventArgs) Handles Button1.Click
-
- tbxOutput.Cursor = Cursors.WaitCursor
- tbxOutput.Text = ""
-
- Dim policyStatement As PolicyStatement = firstConstructorTest()
- Dim policyStatement2 As PolicyStatement = secondConstructorTest()
-
- ' Add attributes to policy statement.
- '
- policyStatement.Attributes = PolicyStatementAttribute.All
- '
-
- Dim policyStatementCopy As PolicyStatement
- policyStatementCopy = createCopy(policyStatement)
- addXmlMember(policyStatementCopy)
-
- summarizePolicyStatment(policyStatement)
-
- ' Align interface and conclude application.
- tbxOutput.AppendText(vbCrLf + "This sample completed " + _
- "successfully; press Exit to continue.")
-
- tbxOutput.Cursor = Cursors.Default
- End Sub
- ' Construct a PolicyStatement with an Unrestricted permission set.
- Private Function firstConstructorTest() As PolicyStatement
- ' Construct policy statement based on newly created permission set.
- ' Assemble permission set.
- '
- Dim permissions As New PermissionSet(PermissionState.Unrestricted)
-
- permissions.AddPermission( _
- New SecurityPermission(SecurityPermissionFlag.Execution))
- permissions.AddPermission( _
- New ZoneIdentityPermission(SecurityZone.MyComputer))
-
- ' Instantiate a new policy statement with specified permission set.
- Dim policyStatement As New PolicyStatement(permissions)
- '
-
- Return PolicyStatement
- End Function
-
- ' Construct a PolicyStatement with an Unrestricted permission set with
- ' the LevelFinal attribute.
- Private Function secondConstructorTest() As PolicyStatement
- ' Construct policy statement based on newly created permission set.
- ' Assemble permission set.
- '
- Dim permissions As New PermissionSet(PermissionState.Unrestricted)
- permissions.AddPermission( _
- New SecurityPermission(SecurityPermissionFlag.Execution))
- permissions.AddPermission( _
- New ZoneIdentityPermission(SecurityZone.MyComputer))
-
- Dim levelFinalAttribute As PolicyStatementAttribute
- levelFinalAttribute = PolicyStatementAttribute.LevelFinal
-
- ' Instantiate a new policy statement with specified permission set
- ' and the LevelFinal attibute set allowing lower policy levels to be
- ' avoided in a resolve.
- Dim policyStatement As _
- New PolicyStatement(permissions, levelFinalAttribute)
- '
-
- Return policyStatement
- End Function
-
- ' Add named permission set to specified PolicyStatement.
- Private Sub AddPermissions(ByRef policyStatement As PolicyStatement)
- ' Set up a NamedPermissionSet with all permissions.
- '
- Dim allPerms As New NamedPermissionSet("allPerms")
- allPerms.AddPermission( _
- New SecurityPermission(SecurityPermissionFlag.Execution))
- allPerms.AddPermission( _
- New ZoneIdentityPermission(SecurityZone.MyComputer))
- allPerms.AddPermission( _
- New SiteIdentityPermission("www.contoso.com"))
-
- policyStatement.PermissionSet = allPerms
- '
- End Sub
-
- ' If the class attribute is not found in specified PolicyStatement,
- ' add a child XML element with an added class attribute.
- Private Sub addXmlMember(ByRef policyStatement As PolicyStatement)
- '
- Dim xmlElement As SecurityElement = policyStatement.ToXml()
- '
-
- If (xmlElement.Attribute("class") Is Nothing) Then
- '
- Dim newElement As New SecurityElement("PolicyStatement")
- newElement.AddAttribute("class", policyStatement.ToString())
- newElement.AddAttribute("version", "1.1")
-
- newElement.AddChild(New SecurityElement("PermissionSet"))
-
- policyStatement.FromXml(newElement)
- '
-
- tbxOutput.AppendText("Added the class attribute and modified the")
- tbxOutput.AppendText(" version number." + vbCrLf)
- tbxOutput.AppendText(newElement.ToString() + vbCrLf)
- End If
- End Sub
-
- ' Verify specified object is a PolicyStatement type. Retrieve a copy
- ' using the private getCopy method.
- Private Function createCopy( _
- ByVal sourceObject As Object) As PolicyStatement
-
- Dim returnedStatement = New PolicyStatement(Nothing)
-
- ' Compare specified object's type with the PolicyStatement type.
- '
- If (sourceObject.GetType() Is GetType(PolicyStatement)) Then
- '
- returnedStatement = getCopy(CType(sourceObject, PolicyStatement))
- Else
- Throw New ArgumentException("Excepted PolicyStatement type.")
- End If
-
- Return returnedStatement
- End Function
-
- ' Return a copy of the specified PolicyStatement if the result of the
- ' Copy command results in an equivalent object. Otherwise, return the
- ' original object.
- Private Function getCopy( _
- ByVal policyStatement As PolicyStatement) As PolicyStatement
-
- ' Create an equivalent copy of the policy statement.
- '
- Dim policyStatementCopy As PolicyStatement = policyStatement.Copy()
- '
-
- ' Compare the specified objects for equality.
- '
- If (Not policyStatementCopy.Equals(policyStatement)) Then
- '
- Return policyStatementCopy
- Else
- Return policyStatement
- End If
- End Function
-
- ' Summarize the specified PolicyStatement to the console window.
- Private Sub summarizePolicyStatment( _
- ByVal policyStatement As PolicyStatement)
-
- ' Retrieve the class path for policyStatement.
- '
- Dim policyStatementClass As String = policyStatement.ToString()
- '
-
- '
- Dim hashCode As Integer = policyStatement.GetHashCode()
- '
-
- Dim attributeString As String = ""
- ' Retrieve the string representation of the Policy's attributes.
- '
- If (Not policyStatement.AttributeString Is Nothing) Then
- attributeString = policyStatement.AttributeString
- End If
- '
-
- ' Write summary to console window.
- tbxOutput.AppendText("*** " + policyStatementClass + " summary ***")
- tbxOutput.AppendText(vbCrLf)
- tbxOutput.AppendText("PolicyStatement has been created with hash ")
- tbxOutput.AppendText("code(" + hashCode.ToString() + ") ")
-
- tbxOutput.AppendText("containing the following attributes: ")
- tbxOutput.AppendText(attributeString + vbCrLf)
- End Sub
- ' Event handler for Exit button.
- Private Sub Button2_Click( _
- ByVal sender As System.Object, _
- ByVal e As System.EventArgs) Handles Button2.Click
-
- Application.Exit()
- End Sub
-#Region " Windows Form Designer generated code "
-
- Public Sub New()
- MyBase.New()
-
- 'This call is required by the Windows Form Designer.
- InitializeComponent()
-
- 'Add any initialization after the InitializeComponent() call
-
- End Sub
-
- 'Form overrides dispose to clean up the component list.
- Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
- If disposing Then
- If Not (components Is Nothing) Then
- components.Dispose()
- End If
- End If
- MyBase.Dispose(disposing)
- End Sub
-
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
-
- 'NOTE: The following procedure is required by the Windows Form Designer
- 'It can be modified using the Windows Form Designer.
- 'Do not modify it using the code editor.
- Friend WithEvents Panel2 As System.Windows.Forms.Panel
- Friend WithEvents Panel1 As System.Windows.Forms.Panel
- Friend WithEvents Button1 As System.Windows.Forms.Button
- Friend WithEvents Button2 As System.Windows.Forms.Button
- Friend WithEvents tbxOutput As System.Windows.Forms.RichTextBox
- _
- Private Sub InitializeComponent()
- Me.Panel2 = New System.Windows.Forms.Panel
- Me.Button1 = New System.Windows.Forms.Button
- Me.Button2 = New System.Windows.Forms.Button
- Me.Panel1 = New System.Windows.Forms.Panel
- Me.tbxOutput = New System.Windows.Forms.RichTextBox
- Me.Panel2.SuspendLayout()
- Me.Panel1.SuspendLayout()
- Me.SuspendLayout()
- '
- 'Panel2
- '
- Me.Panel2.Controls.Add(Me.Button1)
- Me.Panel2.Controls.Add(Me.Button2)
- Me.Panel2.Dock = System.Windows.Forms.DockStyle.Bottom
- Me.Panel2.DockPadding.All = 20
- Me.Panel2.Location = New System.Drawing.Point(0, 320)
- Me.Panel2.Name = "Panel2"
- Me.Panel2.Size = New System.Drawing.Size(616, 64)
- Me.Panel2.TabIndex = 1
- '
- 'Button1
- '
- Me.Button1.Dock = System.Windows.Forms.DockStyle.Right
- Me.Button1.Font = New System.Drawing.Font( _
- "Microsoft Sans Serif", _
- 9.0!, _
- System.Drawing.FontStyle.Regular, _
- System.Drawing.GraphicsUnit.Point, _
- CType(0, Byte))
- Me.Button1.Location = New System.Drawing.Point(446, 20)
- Me.Button1.Name = "Button1"
- Me.Button1.Size = New System.Drawing.Size(75, 24)
- Me.Button1.TabIndex = 2
- Me.Button1.Text = "&Run"
- '
- 'Button2
- '
- Me.Button2.Dock = System.Windows.Forms.DockStyle.Right
- Me.Button2.Font = New System.Drawing.Font( _
- "Microsoft Sans Serif", _
- 9.0!, _
- System.Drawing.FontStyle.Regular, _
- System.Drawing.GraphicsUnit.Point, _
- CType(0, Byte))
- Me.Button2.Location = New System.Drawing.Point(521, 20)
- Me.Button2.Name = "Button2"
- Me.Button2.Size = New System.Drawing.Size(75, 24)
- Me.Button2.TabIndex = 3
- Me.Button2.Text = "E&xit"
- '
- 'Panel1
- '
- Me.Panel1.Controls.Add(Me.tbxOutput)
- Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill
- Me.Panel1.DockPadding.All = 20
- Me.Panel1.Location = New System.Drawing.Point(0, 0)
- Me.Panel1.Name = "Panel1"
- Me.Panel1.Size = New System.Drawing.Size(616, 320)
- Me.Panel1.TabIndex = 2
- '
- 'tbxOutput
- '
- Me.tbxOutput.AccessibleDescription = _
- "Displays output from application."
- Me.tbxOutput.AccessibleName = "Output textbox."
- Me.tbxOutput.Dock = System.Windows.Forms.DockStyle.Fill
- Me.tbxOutput.Location = New System.Drawing.Point(20, 20)
- Me.tbxOutput.Name = "tbxOutput"
- Me.tbxOutput.Size = New System.Drawing.Size(576, 280)
- Me.tbxOutput.TabIndex = 1
- Me.tbxOutput.Text = "Click the Run button to run the application."
- '
- 'Form1
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(6, 15)
- Me.ClientSize = New System.Drawing.Size(616, 384)
- Me.Controls.Add(Me.Panel1)
- Me.Controls.Add(Me.Panel2)
- Me.Name = "Form1"
- Me.Text = "PolicyStatement"
- Me.Panel2.ResumeLayout(False)
- Me.Panel1.ResumeLayout(False)
- Me.ResumeLayout(False)
-
- End Sub
-
-#End Region
-End Class
-'
-' This sample produces the following output:
-'
-' Added the class attribute and modified the version number.
-'
-'
-'
-'
-' *** System.Security.Policy.PolicyStatement summary ***
-' PolicyStatement has been created with hash code(20) containing the following
-' attributes: Exclusive LevelFinal
-'
-' This sample completed successfully; press Exit to continue
-'
\ No newline at end of file
diff --git a/snippets/visualbasic/System.Windows.Forms/Form/Closing/form1.vb b/snippets/visualbasic/System.Windows.Forms/Form/Closing/form1.vb
deleted file mode 100644
index c0ba15b9411..00000000000
--- a/snippets/visualbasic/System.Windows.Forms/Form/Closing/form1.vb
+++ /dev/null
@@ -1,101 +0,0 @@
-
-Imports System.Drawing
-Imports System.Collections
-Imports System.ComponentModel
-Imports System.Windows.Forms
-Imports System.Data
-
-
-'/
-'/ Summary description for Form1.
-'/
-
-Public Class Form1
- Inherits System.Windows.Forms.Form
- Private strMyOriginalText As String = ""
- Private button1 As System.Windows.Forms.Button
- Private textBox1 As System.Windows.Forms.TextBox
- '/
- '/ Required designer variable.
- '/
- Private components As System.ComponentModel.Container = Nothing
-
-
- Public Sub New()
- '
- ' Required for Windows Form Designer support
- '
- InitializeComponent()
- End Sub
-
-
- '
- ' TODO: Add any constructor code after InitializeComponent call
- '
-
-
-
- '
- 'ToDo: Error processing original source shown below
- '
- ' #region Windows Form Designer generated code
- '-----^--- Pre-processor directives not translated
- '/
- '/ Required method for Designer support - do not modify
- '/ the contents of this method with the code editor.
- '/
- Private Sub InitializeComponent()
- Me.button1 = New System.Windows.Forms.Button()
- Me.textBox1 = New System.Windows.Forms.TextBox()
- Me.SuspendLayout()
- '
- ' button1
- '
- Me.button1.Location = New System.Drawing.Point(200, 64)
- Me.button1.Name = "button1"
- Me.button1.TabIndex = 0
- Me.button1.Text = "button1"
- '
- ' textBox1
- '
- Me.textBox1.Location = New System.Drawing.Point(48, 64)
- Me.textBox1.Name = "textBox1"
- Me.textBox1.TabIndex = 1
- Me.textBox1.Text = "textBox1"
- '
- ' Form1
- '
- Me.ClientSize = New System.Drawing.Size(292, 266)
- Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.textBox1, Me.button1})
- Me.Name = "Form1"
- Me.Text = "Form1"
- Me.ResumeLayout(False)
- End Sub
-
- '
- 'ToDo: Error processing original source shown below
- ' }
- ' #endregion
- '-----^--- Pre-processor directives not translated
- '/
- '/ The main entry point for the application.
- '/
- _
- Shared Sub Main()
- Application.Run(New Form1())
- End Sub
-
-
- '
- Private Sub Form1_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
- ' Determine if text has changed in the textbox by comparing to original text.
- If textBox1.Text <> strMyOriginalText Then
- ' Display a MsgBox asking the user to save changes or abort.
- If MessageBox.Show("Do you want to save changes to your text?", "My Application", MessageBoxButtons.YesNo) = DialogResult.Yes Then
- ' Cancel the Closing event from closing the form.
- e.Cancel = True
- End If ' Call method to save file...
- End If
- End Sub
-End Class
-'
\ No newline at end of file
diff --git a/snippets/visualbasic/System.Windows.Media/DrawingContext/Overview/pusheffectexample.vb b/snippets/visualbasic/System.Windows.Media/DrawingContext/Overview/pusheffectexample.vb
index a887cc47dda..b4fc05d9943 100644
--- a/snippets/visualbasic/System.Windows.Media/DrawingContext/Overview/pusheffectexample.vb
+++ b/snippets/visualbasic/System.Windows.Media/DrawingContext/Overview/pusheffectexample.vb
@@ -1,10 +1,9 @@
-'
+'
Imports System.Windows.Media.Animation
Imports System.Windows.Media.Effects
Namespace SDKSample
-
Public Class PushEffectExample
Inherits Page
@@ -15,34 +14,19 @@ Namespace SDKSample
' Create a DrawingGroup
Dim dGroup As New DrawingGroup()
- ' Obtain a DrawingContext from
+ ' Obtain a DrawingContext from
' the DrawingGroup.
Using dc As DrawingContext = dGroup.Open()
' Draw a rectangle at full opacity.
dc.DrawRectangle(Brushes.Blue, shapeOutlinePen, New Rect(0, 0, 25, 25))
- ' Push an opacity change of 0.5.
+ ' Push an opacity change of 0.5.
' The opacity of each subsequent drawing will
' will be multiplied by 0.5.
dc.PushOpacity(0.5)
' This rectangle is drawn at 50% opacity.
dc.DrawRectangle(Brushes.Blue, shapeOutlinePen, New Rect(25, 25, 25, 25))
-
- ' Blurs subsquent drawings.
- dc.PushEffect(New BlurBitmapEffect(), Nothing)
-
- ' This rectangle is blurred and drawn at 50% opacity (0.5 x 0.5).
- dc.DrawRectangle(Brushes.Blue, shapeOutlinePen, New Rect(50, 50, 25, 25))
-
- ' This rectangle is also blurred and drawn at 50% opacity.
- dc.DrawRectangle(Brushes.Blue, shapeOutlinePen, New Rect(75, 75, 25, 25))
-
- ' Stop applying the blur to subsquent drawings.
- dc.Pop()
-
- ' This rectangle is drawn at 50% opacity with no blur effect.
- dc.DrawRectangle(Brushes.Blue, shapeOutlinePen, New Rect(100, 100, 25, 25))
End Using
' Display the drawing using an image control.
@@ -54,10 +38,7 @@ Namespace SDKSample
End Sub
-
-
-
End Class
End Namespace
-'
+'
diff --git a/snippets/visualbasic/VS_Snippets_WebNet/HttpCapabilitiesBase.JavaScript/VB/sample_vb.aspx b/snippets/visualbasic/VS_Snippets_WebNet/HttpCapabilitiesBase.JavaScript/VB/sample_vb.aspx
deleted file mode 100644
index f673e319cc0..00000000000
--- a/snippets/visualbasic/VS_Snippets_WebNet/HttpCapabilitiesBase.JavaScript/VB/sample_vb.aspx
+++ /dev/null
@@ -1,39 +0,0 @@
-
-<%@ page language="VB" %>
-
-
-
-
-
-
- Browser Capabilities Sample
-
-
-
-
-
-
\ No newline at end of file
diff --git a/snippets/visualbasic/VS_Snippets_WebNet/Page_GetPostBackEventReference/VB/page_getpostbackeventreference.vb b/snippets/visualbasic/VS_Snippets_WebNet/Page_GetPostBackEventReference/VB/page_getpostbackeventreference.vb
deleted file mode 100644
index 4495cbab7b9..00000000000
--- a/snippets/visualbasic/VS_Snippets_WebNet/Page_GetPostBackEventReference/VB/page_getpostbackeventreference.vb
+++ /dev/null
@@ -1,107 +0,0 @@
-Imports System.Web
-Imports System.Web.UI
-
-
-Namespace MyASPNETControls
- _
-'
- Public Class MyControl
- Inherits Control
- Implements IPostBackEventHandler
-
- ' Create an integer property that is displayed when
- ' the page that contains this control is requested
- ' and save it to the control's ViewState property.
- Public Property Number() As Integer
- Get
- If Not (ViewState("Number") Is Nothing) Then
- Return CInt(ViewState("Number"))
- End If
- Return 50
- End Get
-
- Set
- ViewState("Number") = value
- End Set
- End Property
-
- ' Implement the RaisePostBackEvent method from the
- ' IPostBackEventHandler interface. If inc is passed
- ' to this method, it increases the Number property by one.
- ' If dec is passed to this method, it decreases the
- ' Number property by one.
- Sub RaisePostBackEvent(eventArgument As String) Implements IPostBackEventHandler.RaisePostBackEvent
-
- If eventArgument = "inc" Then
- Number = Number + 1
- End If
- If eventArgument = "dec" Then
- Number = Number - 1
- End If
- End Sub
-
- _
- Protected Overrides Sub Render(writer As HtmlTextWriter)
- ' Converts the Number property to a string and
- ' writes it to the containing page.
- writer.Write(("The Number is " + Number.ToString() + " ("))
-
- ' Uses the GetPostBackEventReference method to pass
- ' inc to the RaisePostBackEvent method when the link
- ' this code creates is clicked.
- writer.Write(("Increase Number"))
-
- writer.Write(" or ")
-
- ' Uses the GetPostBackEventReference method to pass
- ' dec to the RaisePostBackEvent method when the link
- ' this code creates is clicked.
- writer.Write(("Decrease Number"))
- End Sub
- End Class
-'
- _
-'
- Public Class MyControl1
- Inherits Control
- Implements IPostBackEventHandler
-
- ' Create an integer property that is displayed when
- ' the page that contains this control is requested
- ' and save it to the control's ViewState property.
- Public Property Number() As Integer
- Get
- If Not (ViewState("Number") Is Nothing) Then
- Return CInt(ViewState("Number"))
- End If
- Return 50
- End Get
-
- Set
- ViewState("Number") = value
- End Set
- End Property
-
-
- ' Implement the RaisePostBackEvent method from the
- ' IPostBackEventHandler interface. If inc is passed
- ' to this method, it increases the Number property by one.
- Public Sub RaisePostBackEvent(eventArgument As String) Implements IPostBackEventHandler.RaisePostBackEvent
-
- Number = Number + 1
- End Sub
-
- _
- Protected Overrides Sub Render(writer As HtmlTextWriter)
- ' Converts the Number property to a string and
- ' writes it to the containing page.
- writer.Write(("The Number is " + Number.ToString() + " ("))
-
- ' Uses the GetPostBackEventReference method to pass
- ' inc to the RaisePostBackEvent method when the link
- ' this code creates is clicked.
- writer.Write(("Increase Number"))
- End Sub
- End Class
-'
-End Namespace 'MyASPNETControls
\ No newline at end of file
diff --git a/snippets/visualbasic/VS_Snippets_WebNet/Page_RegisterArrayDeclaration/VB/page_registerarraydeclaration.vb.aspx b/snippets/visualbasic/VS_Snippets_WebNet/Page_RegisterArrayDeclaration/VB/page_registerarraydeclaration.vb.aspx
deleted file mode 100644
index ffa58f3502f..00000000000
--- a/snippets/visualbasic/VS_Snippets_WebNet/Page_RegisterArrayDeclaration/VB/page_registerarraydeclaration.vb.aspx
+++ /dev/null
@@ -1,45 +0,0 @@
-<%--
- The following program demonstrates the 'RegisterArrayDeclaration' method of 'Page' class.
-
- The program declares and initializes an array of script based objects.When the button click event
- occurs the client side script loops through the array and executes a method on each of these
- instances to display the names given to them.
---%>
-
-
-
-
-
- " + a.name + "
-
-
-
-
-
diff --git a/snippets/visualbasic/VS_Snippets_WebNet/Page_RegisterHiddenField/VB/page_registerhiddenfield.vb.aspx b/snippets/visualbasic/VS_Snippets_WebNet/Page_RegisterHiddenField/VB/page_registerhiddenfield.vb.aspx
deleted file mode 100644
index ef456a99cb2..00000000000
--- a/snippets/visualbasic/VS_Snippets_WebNet/Page_RegisterHiddenField/VB/page_registerhiddenfield.vb.aspx
+++ /dev/null
@@ -1,43 +0,0 @@
-<%--
- The following program demonstrates the 'RegisterHiddenField' and
- 'RegisterOnSubmitStatement methods of 'Page' class.
-
- The program forms a client side script for hidden field and submit button and a
- script which display the content of hidden field when page load event occurs.
- Prints hidden field value and a message.
---%>
-
-
-
-
- ' + myForm.myHiddenField.value+ '
-
-
-
-
-
diff --git a/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.AuthenticationSection/VB/authenticationsection.vb b/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.AuthenticationSection/VB/authenticationsection.vb
index a622cb28cc2..5bb971a271a 100644
--- a/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.AuthenticationSection/VB/authenticationsection.vb
+++ b/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.AuthenticationSection/VB/authenticationsection.vb
@@ -7,59 +7,47 @@ Imports System.Web
Class UsingAuthenticationSection
-
+
Public Shared Sub Main()
-
+
'
' Get the Web application configuration.
Dim configuration _
As System.Configuration.Configuration = _
System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration( _
"/aspnetTest")
-
+
' Get the section.
Dim authenticationSection _
As AuthenticationSection = _
CType(configuration.GetSection( _
"system.web/authentication"), AuthenticationSection)
-
+
'
-
+
'
Dim newauthenticationSection _
As New AuthenticationSection()
-
+
'
-
- '
- ' Get the current Passport property.
- Dim currentPassport _
- As PassportAuthentication = _
- authenticationSection.Passport
-
- ' Get the Passport redirect URL.
- Dim passRedirectUrl As String = _
- currentPassport.RedirectUrl
-
- '
-
+
'
' Get the current Mode property.
Dim currentMode As AuthenticationMode = _
authenticationSection.Mode
-
+
' Set the Mode property to Windows.
authenticationSection.Mode = _
AuthenticationMode.Windows
-
+
'
-
+
'
' Get the current Forms property.
Dim currentForms _
As FormsAuthenticationConfiguration = _
authenticationSection.Forms
-
+
' Get the Forms attributes.
Dim name As String = _
currentForms.Name
@@ -75,7 +63,7 @@ Class UsingAuthenticationSection
currentForms.SlidingExpiration
Dim enableXappRedirect As Boolean = _
currentForms.EnableCrossAppRedirects
-
+
Dim timeout As TimeSpan = _
currentForms.Timeout
Dim protection As FormsProtectionEnum = _
diff --git a/snippets/visualbasic/VS_Snippets_Wpf/RGBFilterEffectAssembly_snip/visualbasic/rgbfilterbitmapeffect.vb b/snippets/visualbasic/VS_Snippets_Wpf/RGBFilterEffectAssembly_snip/visualbasic/rgbfilterbitmapeffect.vb
deleted file mode 100644
index d68ef3a1137..00000000000
--- a/snippets/visualbasic/VS_Snippets_Wpf/RGBFilterEffectAssembly_snip/visualbasic/rgbfilterbitmapeffect.vb
+++ /dev/null
@@ -1,163 +0,0 @@
-Imports System.Windows
-Imports System.Windows.Media
-Imports System.Windows.Media.Effects
-Imports System.Runtime.InteropServices
-Imports Microsoft.Win32.SafeHandles
-Imports System.Reflection
-Imports System.Security.Permissions
-
-Namespace RGBFilter
- Friend Class COMSafeHandle
- Inherits SafeHandleZeroOrMinusOneIsInvalid
- Friend Sub New()
- MyBase.New(True)
- End Sub
-
- Protected Overrides Function ReleaseHandle() As Boolean
- Marshal.Release(handle)
- Return True
- End Function
- End Class
-
- '
- Public Class Ole32Methods
-
- Friend Shared Function CoCreateInstance(ByRef clsid As Guid, ByVal inner As IntPtr, ByVal context As UInteger, ByRef uuid As Guid, ByRef ppEffect As COMSafeHandle) As UInteger ' HRESULT
- End Function
- End Class
-
- '
- Public Class RGBFilterBitmapEffect
- Inherits BitmapEffect
-
- '
-
- Protected Overrides Function CreateUnmanagedEffect() As SafeHandle
- Const CLSCTX_INPROC_SERVER As UInteger = 1
- Dim IID_IUnknown As New Guid("00000000-0000-0000-C000-000000000046")
- Dim guidEffectCLSID As New Guid("84CF07CC-34C4-460f-B435-3184F5F2FF2A")
- Dim wrapper As SafeHandle = BitmapEffect.CreateBitmapEffectOuter()
-
- Dim unmanagedEffect As COMSafeHandle
- Dim hresult As UInteger = Ole32Methods.CoCreateInstance(guidEffectCLSID, wrapper.DangerousGetHandle(), CLSCTX_INPROC_SERVER, IID_IUnknown, unmanagedEffect)
- InitializeBitmapEffect(wrapper, unmanagedEffect)
- If 0 = hresult Then
- Return wrapper
- End If
- Throw New Exception("Cannot instantiate effect. HRESULT = " & hresult.ToString())
- End Function
- '
-
-
- #Region "Public Methods"
-
- Public Sub New()
- End Sub
-
- Public Shadows Function Clone() As RGBFilterBitmapEffect
- Return CType(MyBase.Clone(), RGBFilterBitmapEffect)
- End Function
-
- Public Shadows Function CloneCurrentValue() As RGBFilterBitmapEffect
- Return CType(MyBase.CloneCurrentValue(), RGBFilterBitmapEffect)
- End Function
-
- #End Region ' Public Methods
-
- #Region "Public Properties"
- Public Property Red() As Double
- Get
- Return CDbl(GetValue(RedProperty))
- End Get
- Set(ByVal value As Double)
- SetValue(RedProperty, value)
- End Set
- End Property
-
- Public Property Green() As Double
- Get
- Return CDbl(GetValue(GreenProperty))
- End Get
- Set(ByVal value As Double)
- SetValue(GreenProperty, value)
- End Set
- End Property
-
- Public Property Blue() As Double
- Get
- Return CDbl(GetValue(BlueProperty))
- End Get
- Set(ByVal value As Double)
- SetValue(BlueProperty, value)
- End Set
- End Property
-
- Public Shared ReadOnly RedProperty As DependencyProperty = DependencyProperty.Register("Red", GetType(Double), GetType(RGBFilterBitmapEffect), New PropertyMetadata(defaultRed, AddressOf OnPropertyInvalidated))
-
- Public Shared ReadOnly GreenProperty As DependencyProperty = DependencyProperty.Register("Green", GetType(Double), GetType(RGBFilterBitmapEffect), New PropertyMetadata(defaultGreen, AddressOf OnPropertyInvalidated))
-
- Public Shared ReadOnly BlueProperty As DependencyProperty = DependencyProperty.Register("Blue", GetType(Double), GetType(RGBFilterBitmapEffect), New PropertyMetadata(defaultBlue, AddressOf OnPropertyInvalidated))
-
-
- #End Region ' Public Properties
-
- #Region "Protected Methods"
-
- Protected Overrides Sub UpdateUnmanagedPropertyState(ByVal unmanagedEffect As SafeHandle)
- BitmapEffect.SetValue(unmanagedEffect, "Red", Me.Red)
- BitmapEffect.SetValue(unmanagedEffect, "Green", Me.Green)
- BitmapEffect.SetValue(unmanagedEffect, "Blue", Me.Blue)
- End Sub
-
- Protected Overrides Function CreateInstanceCore() As Freezable
- Return New RGBFilterBitmapEffect()
- End Function
-
- Protected Overrides Sub CloneCore(ByVal sourceFreezable As Freezable)
- Dim cycle As RGBFilterBitmapEffect = CType(sourceFreezable, RGBFilterBitmapEffect)
-
- MyBase.CloneCore(sourceFreezable)
- Red = defaultRed
- Green = defaultGreen
- Blue = defaultBlue
- End Sub
- Protected Overrides Sub GetCurrentValueAsFrozenCore(ByVal sourceFreezable As Freezable)
- Dim cycle As RGBFilterBitmapEffect = CType(sourceFreezable, RGBFilterBitmapEffect)
-
- MyBase.GetCurrentValueAsFrozenCore(sourceFreezable)
-
- Red = defaultRed
- Green = defaultGreen
- Blue = defaultBlue
- End Sub
-
- Protected Overrides Sub CloneCurrentValueCore(ByVal sourceAnimatable As Freezable)
- Dim sourceRGBFilterBitmapEffect As RGBFilterBitmapEffect = CType(sourceAnimatable, RGBFilterBitmapEffect)
-
- sourceRGBFilterBitmapEffect = Me
-
- MyBase.CloneCurrentValueCore(sourceAnimatable)
-
- Red = sourceRGBFilterBitmapEffect.Red
- Green = sourceRGBFilterBitmapEffect.Green
- Blue = sourceRGBFilterBitmapEffect.Blue
-
- End Sub
- #End Region ' ProtectedMethods
-
- Private Shared Sub OnPropertyInvalidated(ByVal d As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs)
- If (CDbl(e.NewValue)) > 1.0 OrElse (CDbl(e.NewValue)) < -1.0 Then
- Throw New ArgumentOutOfRangeException("Red","Property value must be between -1 and 1.")
- Else
- CType(d, RGBFilterBitmapEffect).OnChanged()
- End If
- End Sub
-
- #Region "Internal Fields"
- Friend Const defaultRed As Double = &H0
- Friend Const defaultGreen As Double = &H0
- Friend Const defaultBlue As Double = &H0
- #End Region ' Internal Fields
- End Class
- '
-End Namespace
diff --git a/snippets/visualbasic/VS_Snippets_Wpf/RGBFilterEffectAssembly_snip/visualbasic/rgbfilterbitmapeffect.vbproj b/snippets/visualbasic/VS_Snippets_Wpf/RGBFilterEffectAssembly_snip/visualbasic/rgbfilterbitmapeffect.vbproj
deleted file mode 100644
index 83625ff05d5..00000000000
--- a/snippets/visualbasic/VS_Snippets_Wpf/RGBFilterEffectAssembly_snip/visualbasic/rgbfilterbitmapeffect.vbproj
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
- Debug
- AnyCPU
- {9CD91C99-0FED-435F-88DF-3E8F725EB704}
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}
-
- ManagedRGBFilterBitmapEffect
- library
- 1.0.0.*
-
- v4.0
- On
- Binary
- Off
- On
- Client
- 10.0.20821
-
-
- true
- full
- false
- .\bin\Debug\
- true
- true
- true
-
-
- false
- true
- .\bin\Release\
- false
- true
- true
-
-
-
-
-
-
-
-
-
- 4.0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/xml/System.Net.Sockets/TcpListener.xml b/xml/System.Net.Sockets/TcpListener.xml
index 32d25b642e5..a691dda46eb 100644
--- a/xml/System.Net.Sockets/TcpListener.xml
+++ b/xml/System.Net.Sockets/TcpListener.xml
@@ -76,7 +76,7 @@
## Examples
The following code example creates a .
-
+
:::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpListener/Overview/tcpserver.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Net.Sockets/TcpListener/Overview/tcpserver.vb" id="Snippet1":::
@@ -156,21 +156,13 @@
or constructors.
+> [!NOTE]
+> This constructor is obsolete. Use the or constructors.
This constructor allows you to specify the port number on which to listen for incoming connection attempts. With this constructor, the underlying service provider assigns the most appropriate network address. If you do not care which local port is used, you can specify 0 for the port number. In this case, the service provider will assign an available ephemeral port number. If you use this approach, you can discover what local network address and port number has been assigned by using the property.
Call the method to begin listening for incoming connection attempts.
-
-
-## Examples
- The following code example creates a using a local port number.
-
- :::code language="csharp" source="~/snippets/csharp/System.Net.Sockets/TcpListener/.ctor/source.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/System.Net.Sockets/TcpListener/.ctor/source.vb" id="Snippet3":::
-
]]>
diff --git a/xml/System.Net/WebProxy.xml b/xml/System.Net/WebProxy.xml
index f8c17a52703..bf575483465 100644
--- a/xml/System.Net/WebProxy.xml
+++ b/xml/System.Net/WebProxy.xml
@@ -1193,7 +1193,6 @@
method reads the nondynamic proxy settings from the computer's Internet options and creates a instance with those settings.
The method does not pick up any dynamic settings that are generated from scripts run by Internet Explorer, from automatic configuration entries, or from DHCP or DNS lookups.
@@ -1203,11 +1202,6 @@
> [!NOTE]
> This property is not supported on .NET Core.
-## Examples
- The following code example demonstrates calling this method.
-
- :::code language="csharp" source="~/snippets/csharp/System.Net/WebProxy/.ctor/nclwebproxy.cs" id="Snippet11":::
-
]]>On .NET Core.
diff --git a/xml/System.Reflection.Emit/FieldBuilder.xml b/xml/System.Reflection.Emit/FieldBuilder.xml
index 86a1857a619..92e96d3092a 100644
--- a/xml/System.Reflection.Emit/FieldBuilder.xml
+++ b/xml/System.Reflection.Emit/FieldBuilder.xml
@@ -1055,17 +1055,7 @@ For information on how to format `binaryAttribute`, see the metadata specificati
A descriptor specifying the native marshaling of this field.
Describes the native marshaling of the field.
-
-
-
+ To be added. is .The containing type has been created using .
diff --git a/xml/System.Reflection.Emit/MethodBuilder.xml b/xml/System.Reflection.Emit/MethodBuilder.xml
index fabd46487b6..1e697420e61 100644
--- a/xml/System.Reflection.Emit/MethodBuilder.xml
+++ b/xml/System.Reflection.Emit/MethodBuilder.xml
@@ -2656,17 +2656,7 @@ For information on how to format `binaryAttribute`, see the metadata specificati
Marshaling information for the return type of this method.
Sets marshaling information for the return type of this method.
-
-
-
+ To be added.The containing type was previously created using .
-or-
diff --git a/xml/System.Runtime.InteropServices/Marshal.xml b/xml/System.Runtime.InteropServices/Marshal.xml
index 63d61abbb04..454b19edb3e 100644
--- a/xml/System.Runtime.InteropServices/Marshal.xml
+++ b/xml/System.Runtime.InteropServices/Marshal.xml
@@ -649,9 +649,9 @@
To solve this problem:
-1. Use the method to turn off automatic cleanup of RCWs, and the message pumping that occurs, on a per-thread basis. This allows developers to opt out of automatic clean-up, and the corresponding message pumping.
+1. Use the method to turn off automatic cleanup of RCWs, and the message pumping that occurs, on a per-thread basis. This allows developers to opt out of automatic clean-up, and the corresponding message pumping.
-2. Use the method to notify the runtime to clean up all RCWs that are allocated in the current context. This companion method allows developers to precisely control when the runtime performs cleanup in the current context.
+2. Use the method to notify the runtime to clean up all RCWs that are allocated in the current context. This companion method allows developers to precisely control when the runtime performs cleanup in the current context.
]]>
@@ -5631,8 +5631,8 @@ On .NET 6 and later versions, this method is functionally equivalent to
- [System.Obsolete("The GetThreadFromFiberCookie method has been deprecated. Use the hosting API to perform this operation.", false)]
- [<System.Obsolete("The GetThreadFromFiberCookie method has been deprecated. Use the hosting API to perform this operation.", false)>]
+ [System.Obsolete("The GetThreadFromFiberCookie method has been deprecated. Use the hosting API to perform this operation.", false)]
+ [<System.Obsolete("The GetThreadFromFiberCookie method has been deprecated. Use the hosting API to perform this operation.", false)>][System.Security.SecurityCritical]
@@ -7839,25 +7839,9 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as an value. You can pass a value type to this overload method. In this case, the returned object is a boxed instance.
If the `ptr` parameter equals , `null` will be returned.
-
-## Examples
- The following example creates a managed structure, transfers it to unmanaged memory, and then transfers it back to managed memory using the method.
-
- :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/PtrToStructure/sample.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/PtrToStructure/sample.vb" id="Snippet1":::
-
- The following example demonstrates how to marshal an unmanaged block of memory to a managed structure using the method.
-
-> [!IMPORTANT]
-> This code assumes 32-bit compilation. Before using a 64-bit compiler, replace with .
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/PtrToStructure/CPP/pts.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/PtrToStructure/pts.cs" id="Snippet1":::
-
]]>The parameter layout is not sequential or explicit.
@@ -7940,7 +7924,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as values. You can pass a value type to this method overload.
- If the `ptr` parameter equals and `T` is a reference type, `null` is returned. If `ptr` equals and `T` is a value type, a is thrown.
+ If the `ptr` parameter equals and `T` is a reference type, `null` is returned. If `ptr` equals and `T` is a value type, a is thrown.
]]>
The layout of is not sequential or explicit.
@@ -8023,7 +8007,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as values. You cannot use this method overload with value types.
- If the `ptr` parameter equals and `T` is a reference type, `null` is returned. If `ptr` equals and `T` is a value type, a is thrown.
+ If the `ptr` parameter equals and `T` is a reference type, `null` is returned. If `ptr` equals and `T` is a value type, a is thrown.
]]>
Structure layout is not sequential or explicit.
@@ -10467,14 +10451,6 @@ The system error is based on the current operating system—that is, `errno`
You can use the method to determine how much unmanaged memory to allocate using the and methods.
-
-
-## Examples
- The following example creates a managed structure, transfers it to unmanaged memory, and then transfers it back to managed memory. This example uses the method to determine how much unmanaged memory to allocate.
-
- :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/PtrToStructure/sample.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/PtrToStructure/sample.vb" id="Snippet1":::
-
]]>
The parameter is .
@@ -10545,20 +10521,10 @@ The system error is based on the current operating system—that is, `errno`
value applied to that class.
-
-
-## Examples
- The following example demonstrates calling the method. This code example is part of a larger example provided for the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Marshal/cpp/marshal.cpp" id="Snippet3":::
- :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/Overview/Marshal.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/Overview/Marshal.vb" id="Snippet3":::
-
]]>The parameter is a generic type definition.
@@ -11326,7 +11292,6 @@ The system error is based on the current operating system—that is, `errno`
attribute, as either or .
@@ -11337,26 +11302,18 @@ The system error is based on the current operating system—that is, `errno`
The overall pattern for using is as follows:
-1. On the first call to the method after a memory block has been allocated, `fDeleteOld` must be `false`, because there are no contents to clear.
+1. On the first call to the method after a memory block has been allocated, `fDeleteOld` must be `false`, because there are no contents to clear.
> [!IMPORTANT]
> Specify `true` for `fDeleteOld` only if the block contains valid data.
-2. If you copy a different instance to the memory block, and the object contains reference types, `fDeleteOld` must be `true` to free reference types in the old contents.
+2. If you copy a different instance to the memory block, and the object contains reference types, `fDeleteOld` must be `true` to free reference types in the old contents.
-3. If the object contains reference types, you must call the method before you free the memory block.
+3. If the object contains reference types, you must call the method before you free the memory block.
> [!NOTE]
> To pin an existing structure instead of copying it, use the type to create a pinned handle for the structure. For details on how to pin, see [Copying and Pinning](/dotnet/framework/interop/copying-and-pinning).
-
-
-## Examples
- The following example creates a managed structure, transfers it to unmanaged memory using the method, and then transfers it back to managed memory using the method.
-
- :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/PtrToStructure/sample.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/PtrToStructure/sample.vb" id="Snippet1":::
-
]]>
@@ -11455,14 +11412,14 @@ The system error is based on the current operating system—that is, `errno`
The overall pattern for using is as follows:
-1. On the first call to the method after a memory block has been allocated, `fDeleteOld` must be `false`, because there are no contents to clear.
+1. On the first call to the method after a memory block has been allocated, `fDeleteOld` must be `false`, because there are no contents to clear.
> [!IMPORTANT]
> Specify `true` for `fDeleteOld` only if the block contains valid data.
-2. If you copy a different instance to the memory block, and the object contains reference types, `fDeleteOld` must be `true` to free reference types in the old contents.
+2. If you copy a different instance to the memory block, and the object contains reference types, `fDeleteOld` must be `true` to free reference types in the old contents.
-3. If the object contains reference types, you must call the method before you free the memory block.
+3. If the object contains reference types, you must call the method before you free the memory block.
> [!NOTE]
> To pin an existing structure instead of copying it, use the type to create a pinned handle for the structure. For details on how to pin, see [Copying and Pinning](/dotnet/framework/interop/copying-and-pinning).
diff --git a/xml/System.Runtime.Remoting.Channels/ChannelServices.xml b/xml/System.Runtime.Remoting.Channels/ChannelServices.xml
index 585415b556c..9c051beb36c 100644
--- a/xml/System.Runtime.Remoting.Channels/ChannelServices.xml
+++ b/xml/System.Runtime.Remoting.Channels/ChannelServices.xml
@@ -333,23 +333,14 @@
[!NOTE]
-> is obsolete. Please use instead.
+> is obsolete. Please use instead.
The method takes in the interface from a channel object. The channel's must be unique, or the channel must be anonymous. A channel is anonymous if the is set to either `null` or by using the `name` configuration property.
You cannot register two channels with the same name in a . By default, the name of a is "http" and the name of a is "tcp." Therefore, if you want to register two channels of the same type, you must specify a different name for one of them through configuration properties.
- For more information about channel configuration properties, see , and [\ Element (Template)](https://msdn.microsoft.com/library/73399d48-f0fd-46e9-828b-6cdafde5ffce).
-
-
-
-## Examples
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpChannel/CPP/server.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/ChannelServices/RegisterChannel/server.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/ChannelServices/RegisterChannel/server.vb" id="Snippet1":::
+ For more information about channel configuration properties, see , and [\ Element (Template)](/previous-versions/dotnet/netframework-4.0/4ehk8h72(v=vs.100)).
]]>
diff --git a/xml/System.Runtime.Remoting/RemotingConfiguration.xml b/xml/System.Runtime.Remoting/RemotingConfiguration.xml
index f9fe917e680..284cb8ea616 100644
--- a/xml/System.Runtime.Remoting/RemotingConfiguration.xml
+++ b/xml/System.Runtime.Remoting/RemotingConfiguration.xml
@@ -155,24 +155,15 @@
[!NOTE]
> is obsolete. Please use instead.
Passing `null` as the `filename` parameter will cause default remoting initialization without requiring the existence of a configuration file.
- For configuration file syntax, see [Remoting Settings Schema](https://msdn.microsoft.com/library/dc2d1e62-9af7-4ca1-99fd-98b93bb4db9e).
+ For configuration file syntax, see [Remoting Settings Schema](/previous-versions/dotnet/netframework-4.0/z415cf9a(v=vs.100)).
> [!NOTE]
-> Marshal-by-reference objects (MBRs) do not reside in memory forever. Instead, unless the type overrides to control its own lifetime policies, each MBR has a finite lifetime before the .NET Framework remoting system begins the process of deleting it and reclaiming the memory. For more information, see [Lifetime Leases](https://msdn.microsoft.com/library/c72d561c-1266-4c8b-b258-2c168c08da9a).
-
-
-
-## Examples
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingConfiguration_Configure_Client/CPP/remotingconfiguration_configure_server.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingConfiguration/Configure/remotingconfiguration_configure_server.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/RemotingConfiguration/Configure/remotingconfiguration_configure_server.vb" id="Snippet1":::
+> Marshal-by-reference objects (MBRs) do not reside in memory forever. Instead, unless the type overrides to control its own lifetime policies, each MBR has a finite lifetime before the .NET Framework remoting system begins the process of deleting it and reclaiming the memory. For more information, see [Lifetime Leases](/previous-versions/dotnet/netframework-4.0/23bk23zc(v=vs.100)).
]]>
diff --git a/xml/System.Security.Cryptography.X509Certificates/X509Certificate.xml b/xml/System.Security.Cryptography.X509Certificates/X509Certificate.xml
index 1bd4774baf2..8e8146b6e70 100644
--- a/xml/System.Security.Cryptography.X509Certificates/X509Certificate.xml
+++ b/xml/System.Security.Cryptography.X509Certificates/X509Certificate.xml
@@ -2675,17 +2675,7 @@
Returns the name of the certification authority that issued the X.509v3 certificate.The name of the certification authority that issued the X.509 certificate.
-
- method to return the certificate issuer's name and displays it to the console.
-
- :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetIssuerName/example.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography.X509Certificates/X509Certificate/GetIssuerName/example.vb" id="Snippet1":::
-
- ]]>
-
+ To be added.An error with the certificate occurs. For example:
- The certificate file does not exist.
@@ -2949,17 +2939,7 @@
Returns the name of the principal to which the certificate was issued.The name of the principal to which the certificate was issued.
-
- method to return the name of a certificate's principal and displays it to the console.
-
- :::code language="csharp" source="~/snippets/csharp/System.Security.Cryptography.X509Certificates/X509Certificate/GetName/example.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Cryptography.X509Certificates/X509Certificate/GetName/example.vb" id="Snippet1":::
-
- ]]>
-
+ To be added.The certificate context is invalid.
diff --git a/xml/System.Security.Policy/Evidence.xml b/xml/System.Security.Policy/Evidence.xml
index 12b7bce752b..90511cabbab 100644
--- a/xml/System.Security.Policy/Evidence.xml
+++ b/xml/System.Security.Policy/Evidence.xml
@@ -67,30 +67,27 @@
Defines the set of information that constitutes input to security policy decisions. This class cannot be inherited.
- class is a collection (see ) that holds a set of objects that represent evidence. This class holds two sets that correspond to the source of the evidence: host evidence and assembly evidence.
-
- Policy can get evidence from two different sources when evaluating permissions for code.
-
-- `Host evidence` is provided by the host, and can only be provided by hosts that have been granted the permission. Typically, this is evidence of the origin of the code and digital signatures on the assembly. Evidence about origin typically includes , , and evidence. Signatures refer to software publisher (AuthentiCode X.509v3 signature) and strong name identities. Both kinds of digital signature-based identity are built into the assembly, but must be validated and passed to policy by the host; when loaded, the security system verifies the signature. The system then creates the appropriate evidence and passes it to policy only if the corresponding signature is valid.
-
-- `Assembly evidence` is part of the assembly itself. Developers or administrators can attach custom evidence to the assembly to extend the set of evidence for policy. Assembly evidence can only be added at the time of assembly generation, which occurs before the assembly is signed. The default policy of the security system ignores assembly-provided evidence, but policy can be extended to accept it.
-
-
-
-## Examples
- The following code example demonstrates how to create new classes with both host evidence and assembly evidence.
-
+ class is a collection (see ) that holds a set of objects that represent evidence. This class holds two sets that correspond to the source of the evidence: host evidence and assembly evidence.
+
+ Policy can get evidence from two different sources when evaluating permissions for code:
+
+- `Host evidence` is provided by the host, and can only be provided by hosts that have been granted the permission. Typically, this is evidence of the origin of the code and digital signatures on the assembly. Evidence about origin typically includes , , and evidence. Signatures refer to software publisher (AuthentiCode X.509v3 signature) and strong name identities. Both kinds of digital signature-based identity are built into the assembly, but must be validated and passed to policy by the host; when loaded, the security system verifies the signature. The system then creates the appropriate evidence and passes it to policy only if the corresponding signature is valid.
+- `Assembly evidence` is part of the assembly itself. Developers or administrators can attach custom evidence to the assembly to extend the set of evidence for policy. Assembly evidence can only be added at the time of assembly generation, which occurs before the assembly is signed. The default policy of the security system ignores assembly-provided evidence, but policy can be extended to accept it.
+
+## Examples
+ The following code example demonstrates how to create new classes with both host evidence and assembly evidence.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.Evidence/CPP/evidence_evidence.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Security.Policy/Evidence/Overview/evidence_evidence.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet1":::
+
]]>
@@ -138,15 +135,15 @@
Initializes a new empty instance of the class.
- constructor. This example is part of a larger example provided for the class.
-
+ constructor. This example is part of a larger example provided for the class.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.Evidence/CPP/evidence_evidence.cpp" id="Snippet15":::
:::code language="csharp" source="~/snippets/csharp/System.Security.Policy/Evidence/Overview/evidence_evidence.cs" id="Snippet15":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet15":::
-
+ :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet15":::
+
]]>
@@ -188,15 +185,15 @@
The instance from which to create the new instance. This instance is not deep-copied.
Initializes a new instance of the class from a shallow copy of an existing one.
- constructor. This example is part of a larger example provided for the class.
-
+ constructor. This example is part of a larger example provided for the class.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.Evidence/CPP/evidence_evidence.cpp" id="Snippet12":::
:::code language="csharp" source="~/snippets/csharp/System.Security.Policy/Evidence/Overview/evidence_evidence.cs" id="Snippet12":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet12":::
-
+ :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet12":::
+
]]>The parameter is not a valid instance of .
@@ -254,18 +251,7 @@
The host evidence from which to create the new instance.
The assembly evidence from which to create the new instance.
Initializes a new instance of the class from multiple sets of host and assembly evidence.
-
- constructor. This example is part of a larger example provided for the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.Evidence/CPP/evidence_evidence.cpp" id="Snippet3":::
- :::code language="csharp" source="~/snippets/csharp/System.Security.Policy/Evidence/Overview/evidence_evidence.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet3":::
-
- ]]>
-
+ To be added.
@@ -304,11 +290,11 @@
The assembly evidence from which to create the new instance.
Initializes a new instance of the class from multiple sets of host and assembly evidence.
- class.
-
+ class.
+
]]>
@@ -367,23 +353,13 @@
Any evidence object.
Adds the specified assembly evidence to the evidence set.
- [!NOTE]
-> This method does not perform a check to prevent adding duplicate types of evidence. Many assembly evidence objects can exist at the same time.
-
-
-
-## Examples
- The following code example shows the use of the method. This example is part of a larger example provided for the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.Evidence/CPP/evidence_evidence.cpp" id="Snippet4":::
- :::code language="csharp" source="~/snippets/csharp/System.Security.Policy/Evidence/Overview/evidence_evidence.cs" id="Snippet4":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet4":::
-
+> This method does not perform a check to prevent adding duplicate types of evidence. Many assembly evidence objects can exist at the same time.
+
]]>
@@ -449,11 +425,11 @@
The assembly evidence to add.
Adds an evidence object of the specified type to the assembly-supplied evidence list.
- , cannot be added. Only evidence that is derived from can be added. This method does not allow you to add evidence if evidence of that type already exists in the assembly list.
-
+ , cannot be added. Only evidence that is derived from can be added. This method does not allow you to add evidence if evidence of that type already exists in the assembly list.
+
]]>
@@ -521,23 +497,13 @@
Any evidence object.
Adds the specified evidence supplied by the host to the evidence set.
- [!NOTE]
-> This method does not perform a check to prevent adding duplicate types of evidence. Many host evidence objects can exist at the same time.
-
-
-
-## Examples
- The following code example shows the use of the method. This example is part of a larger example provided for the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.Evidence/CPP/evidence_evidence.cpp" id="Snippet2":::
- :::code language="csharp" source="~/snippets/csharp/System.Security.Policy/Evidence/Overview/evidence_evidence.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet2":::
-
+> This method does not perform a check to prevent adding duplicate types of evidence. Many host evidence objects can exist at the same time.
+
]]>
@@ -603,11 +569,11 @@
The host evidence to add.
Adds host evidence of the specified type to the host evidence collection.
- , cannot be added. Only evidence that is derived from can be added. This method does not allow you to add evidence if evidence of that type already exists in the assembly list.
-
+ , cannot be added. Only evidence that is derived from can be added. This method does not allow you to add evidence if evidence of that type already exists in the assembly list.
+
]]>
@@ -661,20 +627,20 @@
Removes the host and assembly evidence from the evidence set.
- removes the evidence in the host and assembly enumerations, setting both to `null`.
-
-
-
-## Examples
- The following code example shows the use of the method. This example is part of a larger example provided for the class.
-
+ removes the evidence in the host and assembly enumerations, setting both to `null`.
+
+
+
+## Examples
+ The following code example shows the use of the method. This example is part of a larger example provided for the class.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.Evidence/CPP/evidence_evidence.cpp" id="Snippet13":::
:::code language="csharp" source="~/snippets/csharp/System.Security.Policy/Evidence/Overview/evidence_evidence.cs" id="Snippet13":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet13":::
-
+ :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet13":::
+
]]>
@@ -722,11 +688,11 @@
Returns a duplicate copy of this evidence object.A duplicate copy of this evidence object.
-
@@ -789,18 +755,7 @@
The target array to which to copy evidence objects.
The zero-based position in the array to which to begin copying evidence objects.
Copies evidence objects to an .
-
- method. This example is part of a larger example provided for the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.Evidence/CPP/evidence_evidence.cpp" id="Snippet6":::
- :::code language="csharp" source="~/snippets/csharp/System.Security.Policy/Evidence/Overview/evidence_evidence.cs" id="Snippet6":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet6":::
-
- ]]>
-
+ To be added. is null.
@@ -860,18 +815,7 @@
Gets the number of evidence objects in the evidence set.The number of evidence objects in the evidence set.
-
- property. This example is part of a larger example provided for the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.Evidence/CPP/evidence_evidence.cpp" id="Snippet12":::
- :::code language="csharp" source="~/snippets/csharp/System.Security.Policy/Evidence/Overview/evidence_evidence.cs" id="Snippet12":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet12":::
-
- ]]>
-
+ To be added.
@@ -912,10 +856,10 @@
.
-## Examples
+## Examples
The following code example shows the use of the Equals method. This example is part of a larger example provided for the class.
```vb
@@ -981,15 +925,15 @@ Console::WriteLine( "Does the copy equal the current evidence? {0}", myEvidence-
Enumerates evidence provided by the assembly.An enumerator for evidence added by the method.
- method. This example is part of a larger example provided for the class.
-
+ method. This example is part of a larger example provided for the class.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.Evidence/CPP/evidence_evidence.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System.Security.Policy/Evidence/Overview/evidence_evidence.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet3":::
+
]]>
@@ -1050,11 +994,11 @@ Console::WriteLine( "Does the copy equal the current evidence? {0}", myEvidence-
Gets assembly evidence of the specified type from the collection.Evidence of type in the assembly evidence collection.
- class. It does not return legacy evidence objects that are derived from other classes.
-
+ class. It does not return legacy evidence objects that are derived from other classes.
+
]]>
@@ -1113,18 +1057,7 @@ Console::WriteLine( "Does the copy equal the current evidence? {0}", myEvidence-
Enumerates all evidence in the set, both that provided by the host and that provided by the assembly.An enumerator for evidence added by both the method and the method.
-
- method. This example is part of a larger example provided for the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.Evidence/CPP/evidence_evidence.cpp" id="Snippet14":::
- :::code language="csharp" source="~/snippets/csharp/System.Security.Policy/Evidence/Overview/evidence_evidence.cs" id="Snippet14":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet14":::
-
- ]]>
-
+ To be added.
@@ -1161,10 +1094,10 @@ Console::WriteLine( "Does the copy equal the current evidence? {0}", myEvidence-
objects.
-## Examples
+## Examples
The following code example shows the use of the GetHashCode method. This example is part of a larger example provided for the class.
```vb
@@ -1224,15 +1157,15 @@ Console::WriteLine( "HashCode = {0}", myEvidence->GetHashCode() );
Enumerates evidence supplied by the host.An enumerator for evidence added by the method.
- method. This example is part of a larger example provided for the class.
-
+ method. This example is part of a larger example provided for the class.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.Evidence/CPP/evidence_evidence.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System.Security.Policy/Evidence/Overview/evidence_evidence.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet2":::
+
]]>
@@ -1293,11 +1226,11 @@ Console::WriteLine( "HashCode = {0}", myEvidence->GetHashCode() );
Gets host evidence of the specified type from the collection.Evidence of type in the host evidence collection.
- class. It does not return legacy evidence objects that are derived from other classes.
-
+ class. It does not return legacy evidence objects that are derived from other classes.
+
]]>
@@ -1339,11 +1272,11 @@ Console::WriteLine( "HashCode = {0}", myEvidence->GetHashCode() );
Gets a value indicating whether the evidence set is read-only.Always , because read-only evidence sets are not supported.
-
@@ -1388,11 +1321,11 @@ Console::WriteLine( "HashCode = {0}", myEvidence->GetHashCode() );
Gets a value indicating whether the evidence set is thread-safe.Always because thread-safe evidence sets are not supported.
-
@@ -1441,15 +1374,15 @@ Console::WriteLine( "HashCode = {0}", myEvidence->GetHashCode() );
if the evidence is locked; otherwise, . The default is .
- property. This example is part of a larger example provided for the class.
-
+ property. This example is part of a larger example provided for the class.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.Evidence/CPP/evidence_evidence.cpp" id="Snippet7":::
:::code language="csharp" source="~/snippets/csharp/System.Security.Policy/Evidence/Overview/evidence_evidence.cs" id="Snippet7":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet7":::
+
]]>
@@ -1500,23 +1433,23 @@ Console::WriteLine( "HashCode = {0}", myEvidence->GetHashCode() );
The evidence set to be merged into the current evidence set.
Merges the specified evidence set into the current evidence set.
- [!NOTE]
-> This method does not perform a check to prevent adding duplicate types of evidence. Many assembly and host evidence objects can exist at the same time.
-
-
-
-## Examples
- The following code example shows the use of the method. This example is part of a larger example provided for the class.
-
+> This method does not perform a check to prevent adding duplicate types of evidence. Many assembly and host evidence objects can exist at the same time.
+
+
+
+## Examples
+ The following code example shows the use of the method. This example is part of a larger example provided for the class.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.Evidence/CPP/evidence_evidence.cpp" id="Snippet10":::
:::code language="csharp" source="~/snippets/csharp/System.Security.Policy/Evidence/Overview/evidence_evidence.cs" id="Snippet10":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet10":::
-
+ :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet10":::
+
]]>The parameter is not a valid instance of .
@@ -1573,19 +1506,19 @@ Console::WriteLine( "HashCode = {0}", myEvidence->GetHashCode() );
The type of the evidence to be removed.
Removes the evidence for a given type from the host and assembly enumerations.
- method can be confirmed using the method and the method.
-## Examples
- The following code example shows the use of the method. This example is part of a larger example provided for the class.
-
+## Examples
+ The following code example shows the use of the method. This example is part of a larger example provided for the class.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.Evidence/CPP/evidence_evidence.cpp" id="Snippet11":::
:::code language="csharp" source="~/snippets/csharp/System.Security.Policy/Evidence/Overview/evidence_evidence.cs" id="Snippet11":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet11":::
-
+ :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/Evidence/Overview/evidence_evidence.vb" id="Snippet11":::
+
]]>
@@ -1632,11 +1565,11 @@ The results of executing the Gets the synchronization root.
Always ( in Visual Basic), because synchronization of evidence sets is not supported.
-
diff --git a/xml/System.Security.Policy/PolicyStatement.xml b/xml/System.Security.Policy/PolicyStatement.xml
index 0bb591aee49..4c116160961 100644
--- a/xml/System.Security.Policy/PolicyStatement.xml
+++ b/xml/System.Security.Policy/PolicyStatement.xml
@@ -53,22 +53,13 @@
Represents the statement of a describing the permissions and other information that apply to code with a particular set of evidence. This class cannot be inherited.
- consists of a set of granted permissions, and possible special attributes for the code group.
-
- Policy statements are typically used as the return value of a operation on a .
-
-
-
-## Examples
- The following code example shows the use of members of the class
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.PolicyStatement_Evt/CPP/members.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Security.Policy/PolicyStatement/Overview/members.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/PolicyStatement/Overview/Form1.vb" id="Snippet1":::
-
+ consists of a set of granted permissions, and possible special attributes for the code group.
+
+ Policy statements are typically used as the return value of a operation on a .
+
]]>
@@ -124,17 +115,8 @@
constructor. This code example is part of a larger example provided for the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.PolicyStatement_Evt/CPP/members.cpp" id="Snippet2":::
- :::code language="csharp" source="~/snippets/csharp/System.Security.Policy/PolicyStatement/Overview/members.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/PolicyStatement/Overview/Form1.vb" id="Snippet2":::
-
+
]]>
@@ -182,17 +164,8 @@
constructor. This code example is part of a larger example provided for the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.PolicyStatement_Evt/CPP/members.cpp" id="Snippet3":::
- :::code language="csharp" source="~/snippets/csharp/System.Security.Policy/PolicyStatement/Overview/members.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/PolicyStatement/Overview/Form1.vb" id="Snippet3":::
-
+
]]>
@@ -229,18 +202,7 @@
Gets or sets the attributes of the policy statement.The attributes of the policy statement.
-
- property to set the flag. This code example is part of a larger example provided for the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.PolicyStatement_Evt/CPP/members.cpp" id="Snippet4":::
- :::code language="csharp" source="~/snippets/csharp/System.Security.Policy/PolicyStatement/Overview/members.cs" id="Snippet4":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/PolicyStatement/Overview/Form1.vb" id="Snippet4":::
-
- ]]>
-
+ To be added.
@@ -276,20 +238,10 @@
Gets a string representation of the attributes of the policy statement.A text string representing the attributes of the policy statement.
- .
-
-
-
-## Examples
- The following code example shows how to use the property to get the policy statement attributes. This code example is part of a larger example provided for the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.PolicyStatement_Evt/CPP/members.cpp" id="Snippet13":::
- :::code language="csharp" source="~/snippets/csharp/System.Security.Policy/PolicyStatement/Overview/members.cs" id="Snippet13":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/PolicyStatement/Overview/Form1.vb" id="Snippet13":::
-
+ .
+
]]>
@@ -327,18 +279,7 @@
Creates an equivalent copy of the current policy statement.A new copy of the with and identical to those of the current .
-
- method to make a copy of the current policy statement. This code example is part of a larger example provided for the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.PolicyStatement_Evt/CPP/members.cpp" id="Snippet9":::
- :::code language="csharp" source="~/snippets/csharp/System.Security.Policy/PolicyStatement/Overview/members.cs" id="Snippet9":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/PolicyStatement/Overview/Form1.vb" id="Snippet9":::
-
- ]]>
-
+ To be added.
@@ -391,20 +332,11 @@
if the specified is equal to the current object; otherwise, .
- method.
-
-
-
-## Examples
- The following code example shows how to use the method to determine whether a specified object is equivalent to the current object. This code example is part of a larger example provided for the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.PolicyStatement_Evt/CPP/members.cpp" id="Snippet10":::
- :::code language="csharp" source="~/snippets/csharp/System.Security.Policy/PolicyStatement/Overview/members.cs" id="Snippet10":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/PolicyStatement/Overview/Form1.vb" id="Snippet10":::
-
+ method.
+
]]>
@@ -463,18 +395,7 @@
The XML encoding to use to reconstruct the security object.
Reconstructs a security object with a given state from an XML encoding.
-
- method to reconstruct a security object from an XML encoding. This code example is part of a larger example provided for the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.PolicyStatement_Evt/CPP/members.cpp" id="Snippet7":::
- :::code language="csharp" source="~/snippets/csharp/System.Security.Policy/PolicyStatement/Overview/members.cs" id="Snippet7":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/PolicyStatement/Overview/Form1.vb" id="Snippet7":::
-
- ]]>
-
+ To be added.The parameter is .The parameter is not a valid encoding.
@@ -569,20 +490,10 @@
Gets a hash code for the object that is suitable for use in hashing algorithms and data structures such as a hash table.A hash code for the current object.
- objects.
-
-
-
-## Examples
- The following code example shows how to use the method to get the hash code for the current policy statement. This code example is part of a larger example provided for the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.PolicyStatement_Evt/CPP/members.cpp" id="Snippet12":::
- :::code language="csharp" source="~/snippets/csharp/System.Security.Policy/PolicyStatement/Overview/members.cs" id="Snippet12":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/PolicyStatement/Overview/Form1.vb" id="Snippet12":::
-
+ objects.
+
]]>
@@ -628,17 +539,8 @@
property to add permissions to the policy statement. This code example is part of a larger example provided for the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.PolicyStatement_Evt/CPP/members.cpp" id="Snippet5":::
- :::code language="csharp" source="~/snippets/csharp/System.Security.Policy/PolicyStatement/Overview/members.cs" id="Snippet5":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/PolicyStatement/Overview/Form1.vb" id="Snippet5":::
-
+
]]>
@@ -695,18 +597,7 @@
Creates an XML encoding of the security object and its current state.An XML encoding of the security object, including any state information.
-
- method to create an XML encoding of the security object. This code example is part of a larger example provided for the class.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Security.Policy.PolicyStatement_Evt/CPP/members.cpp" id="Snippet6":::
- :::code language="csharp" source="~/snippets/csharp/System.Security.Policy/PolicyStatement/Overview/members.cs" id="Snippet6":::
- :::code language="vb" source="~/snippets/visualbasic/System.Security.Policy/PolicyStatement/Overview/Form1.vb" id="Snippet6":::
-
- ]]>
-
+ To be added.
diff --git a/xml/System.Threading/Thread.xml b/xml/System.Threading/Thread.xml
index d69590945fe..dc31f3e133f 100644
--- a/xml/System.Threading/Thread.xml
+++ b/xml/System.Threading/Thread.xml
@@ -838,21 +838,13 @@ This method is obsolete. On .NET 5 and later versions, calling this method produ
property is obsolete.** The non-obsolete alternatives are the method to retrieve the apartment state and the method to set the apartment state.
+**The property is obsolete.** The non-obsolete alternatives are the method to retrieve the apartment state and the method to set the apartment state.
> [!IMPORTANT]
> New threads are initialized as if their apartment state has not been set before they're started. The main application thread is initialized to by default.
You can specify the COM threading model for a C++ application using the [/CLRTHREADATTRIBUTE (Set CLR Thread Attribute)](/cpp/build/reference/clrthreadattribute-set-clr-thread-attribute) linker option.
-## Examples
- The following code example demonstrates how to set the apartment state of a thread.
-
- :::code language="csharp" source="~/snippets/csharp/System.Threading/ApartmentState/Overview/source.cs" id="Snippet1":::
- :::code language="fsharp" source="~/snippets/fsharp/System.Threading/ApartmentState/Overview/source.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/System.Threading/ApartmentState/Overview/source.vb" id="Snippet1":::
-
]]>An attempt is made to set this property to a state that is not a valid apartment state (a state other than single-threaded apartment () or multithreaded apartment ()).
diff --git a/xml/System.Web.Configuration/AuthenticationSection.xml b/xml/System.Web.Configuration/AuthenticationSection.xml
index 2627c2d2ec8..bfde3bda099 100644
--- a/xml/System.Web.Configuration/AuthenticationSection.xml
+++ b/xml/System.Web.Configuration/AuthenticationSection.xml
@@ -187,17 +187,7 @@ This example demonstrates how to use the Gets the element property.A element property that contains information used during passport-based authentication.
-
- element property.
-
- :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.AuthenticationSection/CS/authenticationsection.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.AuthenticationSection/VB/authenticationsection.vb" id="Snippet3":::
-
- ]]>
-
+ To be added.
diff --git a/xml/System.Web.Configuration/HttpCapabilitiesBase.xml b/xml/System.Web.Configuration/HttpCapabilitiesBase.xml
index 72f51d0d73d..d3774608745 100644
--- a/xml/System.Web.Configuration/HttpCapabilitiesBase.xml
+++ b/xml/System.Web.Configuration/HttpCapabilitiesBase.xml
@@ -1556,17 +1556,8 @@
property will return `true` but script will not execute on the browser.
-
-
-## Examples
- The following code example shows how to determine whether the browser supports JavaScript.
-
- :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/HttpCapabilitiesBase.JavaScript/CS/sample_cs.aspx" id="Snippet1":::
- :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/HttpCapabilitiesBase.JavaScript/VB/sample_vb.aspx" id="Snippet1":::
-
]]>
diff --git a/xml/System.Web.Configuration/SystemWebSectionGroup.xml b/xml/System.Web.Configuration/SystemWebSectionGroup.xml
index 214e45a2001..3cf2a723046 100644
--- a/xml/System.Web.Configuration/SystemWebSectionGroup.xml
+++ b/xml/System.Web.Configuration/SystemWebSectionGroup.xml
@@ -17,19 +17,19 @@
Allows the user to programmatically access the group of the configuration file. This class cannot be inherited.
- class refers to the `system.web` group within a configuration file. You can use this type to access any of the sections contained in this group.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file associated with an existing Web application. You can use this object to access the sections contained in the `system.web` group.
-
+ class refers to the `system.web` group within a configuration file. You can use this type to access any of the sections contained in this group.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file associated with an existing Web application. You can use this object to access the sections contained in the `system.web` group.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet1":::
+
]]>
@@ -56,11 +56,11 @@
Creates a new instance of .
- class by using the method.
-
+ class by using the method.
+
]]>
@@ -91,19 +91,19 @@
Gets the section.The object.
- object refers to the `anonymousIdentification` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `anonymousIdentification` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet2":::
+
]]>
@@ -135,19 +135,19 @@
Gets the section.The object.
- object refers to the `authentication` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `authentication` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet3":::
+
]]>
@@ -179,19 +179,19 @@
Gets the section.The object.
- object refers to the `authorization` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `authorization` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet4":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet4":::
+
]]>
@@ -223,19 +223,19 @@
Gets the section.The object.
- object refers to the `browserCaps` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `browserCaps` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet24":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet24":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet24":::
+
]]>
@@ -267,19 +267,19 @@
Gets the section.The object.
- object refers to the `clientTarget` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `clientTarget` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet25":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet25":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet25":::
+
]]>
@@ -311,19 +311,19 @@
Gets the section.The object.
- object refers to the `compilation` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `compilation` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet5":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet5":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet5":::
+
]]>
@@ -355,19 +355,19 @@
Gets the section.The object.
- object refers to the `customErrors` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `customErrors` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet6":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet6":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet6":::
+
]]>
@@ -399,19 +399,19 @@
Gets the section.The object.
- object refers to the `deployment` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `deployment` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet26":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet26":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet26":::
+
]]>
@@ -443,19 +443,19 @@
Gets the section.The object.
- object refers to the `deviceFilters` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `deviceFilters` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet27":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet27":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet27":::
+
]]>
@@ -516,19 +516,19 @@
Gets the section.The object.
- object refers to the `globalization` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `globalization` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet7":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet7":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet7":::
+
]]>
@@ -560,19 +560,19 @@
Gets the section.The object.
- object refers to the `healthMonitoring` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `healthMonitoring` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet28":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet28":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet28":::
+
]]>
@@ -604,14 +604,14 @@
Gets the section.The object refers to the section of the configuration file.
- object from the configuration file of an existing Web application.
-
+ object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet29":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet29":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet29":::
+
]]>
@@ -643,19 +643,19 @@
Gets the section.The object.
- object refers to the `httpCookies` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `httpCookies` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet8":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet8":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet8":::
+
]]>
@@ -687,19 +687,19 @@
Gets the section.The object.
- object refers to the `httpHandlers` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `httpHandlers` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet9":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet9":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet9":::
+
]]>
@@ -731,19 +731,19 @@
Gets the section.The object.
- object refers to the `httpModules` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `httpModules` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet10":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet10":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet10":::
+
]]>
@@ -775,19 +775,19 @@
Gets the section.The object.
- object refers to the `httpRuntime` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `httpRuntime` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet11":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet11":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet11":::
+
]]>
@@ -819,19 +819,19 @@
Gets the section.The object.
- object refers to the `identity` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `identity` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet12":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet12":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet12":::
+
]]>
@@ -863,19 +863,19 @@
Gets the section.The object.
- object refers to the `machineKey` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `machineKey` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet13":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet13":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet13":::
+
]]>
@@ -907,19 +907,19 @@
Gets the section.The object.
- object refers to the `membership` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `membership` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet14":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet14":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet14":::
+
]]>
@@ -954,17 +954,7 @@
Gets the section.The object refers to the section of the configuration file.
-
- object from the configuration file of an existing Web application.
-
- :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet30":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet30":::
-
- ]]>
-
+ To be added.
@@ -994,19 +984,19 @@
Gets the section.The object.
- object refers to the `pages` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `pages` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet15":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet15":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet15":::
+
]]>
@@ -1067,19 +1057,19 @@
Gets the section.The object.
- object refers to the `processModel` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `processModel` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet16":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet16":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet16":::
+
]]>
@@ -1111,19 +1101,19 @@
Gets the section.The object.
- object refers to the `profile` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `profile` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet17":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet17":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet17":::
+
]]>
@@ -1155,14 +1145,14 @@
Gets the section.The object refers to the section of the configuration file.
- object from the configuration file of an existing Web application.
-
+ object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet31":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet31":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet31":::
+
]]>
@@ -1194,19 +1184,19 @@
Gets the section.The object.
- object refers to the `roleManager` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `roleManager` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet18":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet18":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet18":::
+
]]>
@@ -1238,19 +1228,19 @@
Gets the section.The object.
- object refers to the `securityPolicy` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `securityPolicy` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet19":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet19":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet19":::
+
]]>
@@ -1282,19 +1272,19 @@
Gets the section.The object.
- object refers to the `sessionState` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `sessionState` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet20":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet20":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet20":::
+
]]>
@@ -1326,19 +1316,19 @@
Gets the section.The object.
- object refers to the `siteMap` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `siteMap` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet21":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet21":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet21":::
+
]]>
@@ -1370,19 +1360,19 @@
Gets the section.The object.
- object refers to the `trace` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `trace` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet22":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet22":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet22":::
+
]]>
@@ -1414,19 +1404,19 @@
Gets the section.The object.
- object refers to the `trust` section of the configuration file.
-
-
-
-## Examples
- The following code example shows how to obtain the object from the configuration file of an existing Web application.
-
+ object refers to the `trust` section of the configuration file.
+
+
+
+## Examples
+ The following code example shows how to obtain the object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet23":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet23":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet23":::
+
]]>
@@ -1458,14 +1448,14 @@
Gets the section.The object refers to the section of the configuration file.
- object from the configuration file of an existing Web application.
-
+ object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet32":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet32":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet32":::
+
]]>
@@ -1497,14 +1487,14 @@
Gets the section.The object refers to the section of the configuration file.
- object from the configuration file of an existing Web application.
-
+ object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet33":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet33":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet33":::
+
]]>
@@ -1536,14 +1526,14 @@
Gets the section.The object refers to the section of the configuration file.
- object from the configuration file of an existing Web application.
-
+ object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet34":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet34":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet34":::
+
]]>
@@ -1575,14 +1565,14 @@
Gets the section.The object refers to the section of the configuration file.
- object from the configuration file of an existing Web application.
-
+ object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet35":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet35":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet35":::
+
]]>
@@ -1613,14 +1603,14 @@
Gets the section.The object refers to the section of the configuration file.
- object from the configuration file of an existing Web application.
-
+ object from the configuration file of an existing Web application.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/CS/SystemWebSectionGroup.cs" id="Snippet36":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet36":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.SystemWebSectionGroup/VB/SystemWebSectionGroup.vb" id="Snippet36":::
+
]]>
diff --git a/xml/System.Web.UI.WebControls/Xml.xml b/xml/System.Web.UI.WebControls/Xml.xml
index e4f12a595af..25d166346de 100644
--- a/xml/System.Web.UI.WebControls/Xml.xml
+++ b/xml/System.Web.UI.WebControls/Xml.xml
@@ -48,80 +48,80 @@
Displays an XML document without formatting or using Extensible Stylesheet Language Transformations (XSLT).
-
-## Introduction
- Use the control to display the contents of an XML document without formatting or using XSL Transformations.
-
-
-## Specifying XML Data
- The XML document to display is specified by setting one of three properties. These three properties represent the different types of XML documents that can be displayed. You can display a , an XML string, or an XML file by setting the appropriate property. The following table lists the properties for specifying the XML document.
-
-|Property|Description|
-|--------------|-----------------|
-||Sets the XML document using a object. **Warning:** This property is obsolete. Use one of the other properties listed in this section to set the XML content for the control.|
-||Sets the XML document using a string. **Note:** This property is commonly set declaratively by placing text between the opening and closing `` tags of the control.|
-||Sets the XML document using a file.|
-
+
+## Introduction
+ Use the control to display the contents of an XML document without formatting or using XSL Transformations.
+
+
+## Specifying XML Data
+ The XML document to display is specified by setting one of three properties. These three properties represent the different types of XML documents that can be displayed. You can display a , an XML string, or an XML file by setting the appropriate property. The following table lists the properties for specifying the XML document.
+
+|Property|Description|
+|--------------|-----------------|
+||Sets the XML document using a object. **Warning:** This property is obsolete. Use one of the other properties listed in this section to set the XML content for the control.|
+||Sets the XML document using a string. **Note:** This property is commonly set declaratively by placing text between the opening and closing `` tags of the control.|
+||Sets the XML document using a file.|
+
> [!NOTE]
-> At least one of the XML document properties must be set to display an XML document. If more than one XML document property is set, the XML document referenced in the last property set is displayed. The documents in the other properties are ignored.
-
-
-## Specifying an XSL Transformation
- You can optionally specify an XSL Transformation (XSLT) style sheet that formats the XML document before it is written to the output stream by setting one of two properties. The two properties represent the different types of XSL Transformation style sheets that can be used to format the XML document. You can format the XML document with a object or with an XSL Transformation style sheet file by setting the appropriate property. If no XSL Transformation style sheet is specified, the XML document is displayed using the default format. The following table lists the properties for specifying an XSL Transformation style sheet.
-
-|Property|Description|
-|--------------|-----------------|
-||Formats the XML document using the specified object. **Note:** Using a object requires `Full Trust` permissions.|
-||Formats the XML document using the specified XSL Transformation style sheet file.|
-
+> At least one of the XML document properties must be set to display an XML document. If more than one XML document property is set, the XML document referenced in the last property set is displayed. The documents in the other properties are ignored.
+
+
+## Specifying an XSL Transformation
+ You can optionally specify an XSL Transformation (XSLT) style sheet that formats the XML document before it is written to the output stream by setting one of two properties. The two properties represent the different types of XSL Transformation style sheets that can be used to format the XML document. You can format the XML document with a object or with an XSL Transformation style sheet file by setting the appropriate property. If no XSL Transformation style sheet is specified, the XML document is displayed using the default format. The following table lists the properties for specifying an XSL Transformation style sheet.
+
+|Property|Description|
+|--------------|-----------------|
+||Formats the XML document using the specified object. **Note:** Using a object requires `Full Trust` permissions.|
+||Formats the XML document using the specified XSL Transformation style sheet file.|
+
> [!NOTE]
-> The XSL Transformation style sheet is optional. You do not need to set the or the property. If both XSL Transformation style sheet properties are set, the last property set determines which XSL Transformation style sheet is used to format the XML document. The other property is ignored.
-
- The class also provides the property, which enables you to provide the XSL Transformation style sheet with optional arguments. The arguments can be either XSL Transformations (XSLT) parameters or extension objects.
-
-
-## Declarative Syntax
-
-```
-
-```
-
-
-
-## Examples
- The following code example shows how to create and objects from a sample XML file and an XSL Transformation style sheet. The objects are then used by the XML control to display the XML document.
-
+> The XSL Transformation style sheet is optional. You do not need to set the or the property. If both XSL Transformation style sheet properties are set, the last property set determines which XSL Transformation style sheet is used to format the XML document. The other property is ignored.
+
+ The class also provides the property, which enables you to provide the XSL Transformation style sheet with optional arguments. The arguments can be either XSL Transformations (XSLT) parameters or extension objects.
+
+
+## Declarative Syntax
+
+```
+
+```
+
+
+
+## Examples
+ The following code example shows how to create and objects from a sample XML file and an XSL Transformation style sheet. The objects are then used by the XML control to display the XML document.
+
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/XmlClassExample/CS/xmlcs.aspx" id="Snippet1":::
- :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/XmlClassExample/VB/xmlvb.aspx" id="Snippet1":::
-
+ :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/XmlClassExample/VB/xmlvb.aspx" id="Snippet1":::
+
]]>
@@ -183,17 +183,17 @@
An that represents the parsed element.
Notifies the server control that an element, either XML or HTML, was parsed, and adds the element to the server control's object.
- method in a custom server control.
-
+ method in a custom server control.
+
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/CustomXmlAddParsedSubObject/CS/custom_xml_addparsedsubobjectcs.aspx" id="Snippet1":::
- :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CustomXmlAddParsedSubObject/VB/custom_xml_addparsedsubobjectvb.aspx" id="Snippet1":::
-
+ :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CustomXmlAddParsedSubObject/VB/custom_xml_addparsedsubobjectvb.aspx" id="Snippet1":::
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/CustomXmlAddParsedSubObject/CS/custom_xml_addparsedsubobject.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CustomXmlAddParsedSubObject/VB/custom_xml_addparsedsubobject.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CustomXmlAddParsedSubObject/VB/custom_xml_addparsedsubobject.vb" id="Snippet2":::
+
]]>
@@ -282,11 +282,11 @@
Creates a new object.Always returns an .
- method is used primarily by control developers extending the functionality of the control.
-
+ method is used primarily by control developers extending the functionality of the control.
+
]]>XML Web Server Control Overview
@@ -327,21 +327,13 @@
Gets or sets the to display in the control.The to display in the control.
- property is obsolete. To specify the XML that will be displayed in the control, use the property or the property. For more information about these alternatives, see the class overview for the control.
-
- The XML document to display in the control is specified in one of three ways. You can specify a object, an XML string, or an XML file by setting the appropriate property. The property is used to specify a (representing an XML document) to display in the control.
-
-
-
-## Examples
- The following code example shows how to create and objects from a sample XML file and an XSL Transformation style sheet. The objects are then used by the XML control to display the XML document.
-
- :::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/XmlClassExample/CS/xmlcs.aspx" id="Snippet1":::
- :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/XmlClassExample/VB/xmlvb.aspx" id="Snippet1":::
-
+ property is obsolete. To specify the XML that will be displayed in the control, use the property or the property. For more information about these alternatives, see the class overview for the control.
+
+ The XML document to display in the control is specified in one of three ways. You can specify a object, an XML string, or an XML file by setting the appropriate property. The property is used to specify a (representing an XML document) to display in the control.
+
]]>
@@ -383,14 +375,14 @@
Sets a string that contains the XML document to display in the control.A string that contains the XML document to display in the control.
- control is specified in one of three ways. You can specify a object, an XML string, or an XML file by setting the appropriate property. The property is used to specify an XML string (representing an XML document) to display in the control. The property is not typically programmatically set, or set as an attribute of the control. Instead, the XML string is usually set declaratively by placing text between the opening and closing `` tags of the control.
-
+ control is specified in one of three ways. You can specify a object, an XML string, or an XML file by setting the appropriate property. The property is used to specify an XML string (representing an XML document) to display in the control. The property is not typically programmatically set, or set as an attribute of the control. Instead, the XML string is usually set declaratively by placing text between the opening and closing `` tags of the control.
+
> [!NOTE]
-> Although the property contains both `get` and `set` accessors, only the `set` accessor is useful. If you use the `get` accessor, is returned.
-
+> Although the property contains both `get` and `set` accessors, only the `set` accessor is useful. If you use the `get` accessor, is returned.
+
]]>
@@ -447,19 +439,19 @@
Gets or sets the path to an XML document to display in the control.The path to an XML document to display in the control.
- control is specified in one of three ways. You can specify a object, an XML string, or an XML file by setting the appropriate property. The property is used to specify the path to an XML file (representing an XML document) to display in the control. You can use a relative or an absolute path. A relative path relates the location of the file to the location of the Web Forms page or user control, without specifying a complete path on the server. The path is relative to the location of the Web page. This makes it easier to move the entire site to another directory on the server without updating the path to the file in code. An absolute path provides the complete path, so moving the site to another directory requires updating the code.
-
-
-
-## Examples
- The following code example shows how to display an XML document using an XSL Transform in the control.
-
+ control is specified in one of three ways. You can specify a object, an XML string, or an XML file by setting the appropriate property. The property is used to specify the path to an XML file (representing an XML document) to display in the control. You can use a relative or an absolute path. A relative path relates the location of the file to the location of the Web Forms page or user control, without specifying a complete path on the server. The path is relative to the location of the Web page. This makes it easier to move the entire site to another directory on the server without updating the path to the file in code. An absolute path provides the complete path, so moving the site to another directory requires updating the code.
+
+
+
+## Examples
+ The following code example shows how to display an XML document using an XSL Transform in the control.
+
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/XmlControlClassExample/CS/xmlcontrolcs.aspx" id="Snippet1":::
- :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/XmlControlClassExample/VB/xmlcontrolvb.aspx" id="Snippet1":::
-
+ :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/XmlControlClassExample/VB/xmlcontrolvb.aspx" id="Snippet1":::
+
]]>
@@ -503,11 +495,11 @@
Overrides the property. This property is not supported by the class.Always returns . This property is not supported.
- property is inherited from the class, but is not applicable to the class. Any attempt to set the value of this property throws a exception.
-
+ property is inherited from the class, but is not applicable to the class. Any attempt to set the value of this property throws a exception.
+
]]>An attempt is made to set the value of this property.
@@ -573,11 +565,11 @@
Overrides the method. This method is not supported by the class.
- method is inherited from the class, but it is not applicable to the class. Any attempt to invoke the method throws a exception.
-
+ method is inherited from the class, but it is not applicable to the class. Any attempt to invoke the method throws a exception.
+
]]>An attempt is made to invoke this method.
@@ -605,11 +597,11 @@
Gets design-time data for a control.An containing the design-time data for the control.
- method is a helper method used to get the current design-time state of the control.
-
+ method is a helper method used to get the current design-time state of the control.
+
]]>XML Web Server Control Overview
@@ -674,17 +666,17 @@
The result of the output stream.
Renders the results to the output stream.
- method in a custom server control so that the control is always displayed with an image.
-
+ method in a custom server control so that the control is always displayed with an image.
+
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/CustomXmlRender/CS/custom_xml_rendercs.aspx" id="Snippet1":::
- :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CustomXmlRender/VB/custom_xml_rendervb.aspx" id="Snippet1":::
-
+ :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CustomXmlRender/VB/custom_xml_rendervb.aspx" id="Snippet1":::
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/CustomXmlRender/CS/custom_xml_render.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CustomXmlRender/VB/custom_xml_render.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/CustomXmlRender/VB/custom_xml_render.vb" id="Snippet2":::
+
]]>XML Web Server Control Overview
@@ -728,11 +720,11 @@
Overrides the property. This property is not supported by the class.Always returns an empty string (""). This property is not supported.
- property is inherited from the class, but is not applicable to the class. Any attempt to set the value of this property throws a exception.
-
+ property is inherited from the class, but is not applicable to the class. Any attempt to set the value of this property throws a exception.
+
]]>An attempt is made to set the value of this property.
@@ -774,22 +766,22 @@
Gets or sets the object that formats the XML document before it is written to the output stream.The that formats the XML document before it is written to the output stream.
- control to display an XML document, you can optionally specify an Extensible Stylesheet Language Transformation (XSLT) style sheet that formats the XML document, before it is written to the output stream in one of two ways. You can format the XML document with either a object or an XSL Transformation style sheet file. If no XSL Transform document is specified, the XML document is displayed using the default format. The property is used to specify a object (representing an XSL Transform document) used to format the XML document before it is written to the output stream.
-
+ control to display an XML document, you can optionally specify an Extensible Stylesheet Language Transformation (XSLT) style sheet that formats the XML document, before it is written to the output stream in one of two ways. You can format the XML document with either a object or an XSL Transformation style sheet file. If no XSL Transform document is specified, the XML document is displayed using the default format. The property is used to specify a object (representing an XSL Transform document) used to format the XML document before it is written to the output stream.
+
> [!NOTE]
-> Using a object requires `Full Trust` permissions.
-
-
-
-## Examples
- The following code example shows how to create and objects from a sample XML file and an XSL Transformation style sheet. The objects are then used by the XML control to display the XML document.
-
+> Using a object requires `Full Trust` permissions.
+
+
+
+## Examples
+ The following code example shows how to create and objects from a sample XML file and an XSL Transformation style sheet. The objects are then used by the XML control to display the XML document.
+
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/XmlClassExample/CS/xmlcs.aspx" id="Snippet1":::
- :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/XmlClassExample/VB/xmlvb.aspx" id="Snippet1":::
-
+ :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/XmlClassExample/VB/xmlvb.aspx" id="Snippet1":::
+
]]>
@@ -839,13 +831,13 @@
Gets or sets a that contains a list of optional arguments passed to the style sheet and used during the Extensible Stylesheet Language Transformation (XSLT).A that contains a list of optional arguments passed to the style sheet and used during the XSL Transformation.
- property to provide the XSL Transformation style sheet with optional arguments. The arguments can be either XSLT parameters or extension objects.
-
- For more information about using the class, see [XsltArgumentList for Style Sheet Parameters and Extension Objects](/dotnet/standard/data/xml/xsltargumentlist-for-style-sheet-parameters-and-extension-objects).
-
+ property to provide the XSL Transformation style sheet with optional arguments. The arguments can be either XSLT parameters or extension objects.
+
+ For more information about using the class, see [XsltArgumentList for Style Sheet Parameters and Extension Objects](/dotnet/standard/data/xml/xsltargumentlist-for-style-sheet-parameters-and-extension-objects).
+
]]>
@@ -896,19 +888,19 @@
Gets or sets the path to an Extensible Stylesheet Language Transformation (XSLT) style sheet that formats the XML document before it is written to the output stream.The path to an XSL Transformation style sheet that formats the XML document before it is written to the output stream.
- control to display an XML document, you can optionally specify an XSL Transformation style sheet that formats the XML document before it is written to the output stream in one of two ways. You can either format the XML document with a object or with an XSL Transformation style sheet file. If no XSL Transformation style sheet is specified, the XML document is displayed using the default format. The property is used to specify the path to an XSL Transformation style sheet file (representing an XSL Transformation style sheet) used to format the XML document before it is written to the output stream. You can use a relative or an absolute path. A relative path relates the location of the file to the location of the Web Forms page or user control, without specifying a complete path on the server. The path is relative to the location of the Web page. This makes it easier to move the entire site to another directory on the server without updating the path to the file in code. An absolute path provides the complete path, so moving the site to another directory requires updating the code.
-
-
-
-## Examples
- The following code example shows how to display an XML document using an XSL Transform in the control.
-
+ control to display an XML document, you can optionally specify an XSL Transformation style sheet that formats the XML document before it is written to the output stream in one of two ways. You can either format the XML document with a object or with an XSL Transformation style sheet file. If no XSL Transformation style sheet is specified, the XML document is displayed using the default format. The property is used to specify the path to an XSL Transformation style sheet file (representing an XSL Transformation style sheet) used to format the XML document before it is written to the output stream. You can use a relative or an absolute path. A relative path relates the location of the file to the location of the Web Forms page or user control, without specifying a complete path on the server. The path is relative to the location of the Web page. This makes it easier to move the entire site to another directory on the server without updating the path to the file in code. An absolute path provides the complete path, so moving the site to another directory requires updating the code.
+
+
+
+## Examples
+ The following code example shows how to display an XML document using an XSL Transform in the control.
+
:::code language="aspx-csharp" source="~/snippets/csharp/VS_Snippets_WebNet/XmlControlClassExample/CS/xmlcontrolcs.aspx" id="Snippet1":::
- :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/XmlControlClassExample/VB/xmlcontrolvb.aspx" id="Snippet1":::
-
+ :::code language="aspx-vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/XmlControlClassExample/VB/xmlcontrolvb.aspx" id="Snippet1":::
+
]]>
@@ -952,13 +944,13 @@
Gets or sets a cursor model for navigating and editing the XML data associated with the control.An object.
- object with the control.
-
- An object is created from a class that implements the interface, such as the and classes. objects created by objects are read-only, and objects created by objects can be edited. An object's read-only or editable status is determined using the property of the class.
-
+ object with the control.
+
+ An object is created from a class that implements the interface, such as the and classes. objects created by objects are read-only, and objects created by objects can be edited. An object's read-only or editable status is determined using the property of the class.
+
]]>XML Web Server Control Overview
diff --git a/xml/System.Web.UI/Page.xml b/xml/System.Web.UI/Page.xml
index 8f13ef9f585..1417b57b484 100644
--- a/xml/System.Web.UI/Page.xml
+++ b/xml/System.Web.UI/Page.xml
@@ -1976,15 +1976,8 @@
method in the class instead.
-
-
-## Examples
- [!code-csharp[Page_GetPostBackEventReference#2](~/snippets/csharp/VS_Snippets_WebNet/Page_GetPostBackEventReference/CS/page_getpostbackeventreference.cs#2)]
- [!code-vb[Page_GetPostBackEventReference#2](~/snippets/visualbasic/VS_Snippets_WebNet/Page_GetPostBackEventReference/VB/page_getpostbackeventreference.vb#2)]
-
]]>
@@ -2029,15 +2022,8 @@
method in the class instead.
-
-
-## Examples
- [!code-csharp[Page_GetPostBackEventReference#1](~/snippets/csharp/VS_Snippets_WebNet/Page_GetPostBackEventReference/CS/page_getpostbackeventreference.cs#1)]
- [!code-vb[Page_GetPostBackEventReference#1](~/snippets/visualbasic/VS_Snippets_WebNet/Page_GetPostBackEventReference/VB/page_getpostbackeventreference.vb#1)]
-
]]>
@@ -4238,19 +4224,10 @@ In most circumstances, do not set this property in code. The `LCID` attribute ca
method has been deprecated. Use the method in the class.
-
-
-## Examples
- The following code example uses the method to declare an array, `myArray`, that contains three objects named `x`, `y`, and `z`. The example defines and registers a startup script using the method. When the ECMAScript `doClick` function is called from the page that contains this code, the array and its objects are initialized.
-
- [!code-csharp[Page_RegisterArrayDeclaration#1](~/snippets/csharp/VS_Snippets_WebNet/Page_RegisterArrayDeclaration/CS/page_registerarraydeclaration.cs.aspx#1)]
- [!code-vb[Page_RegisterArrayDeclaration#1](~/snippets/visualbasic/VS_Snippets_WebNet/Page_RegisterArrayDeclaration/VB/page_registerarraydeclaration.vb.aspx#1)]
-
]]>
@@ -4404,20 +4381,8 @@ In most circumstances, do not set this property in code. The `LCID` attribute ca
method has been deprecated. Use the method in the class.
-
-
-## Examples
- The following code example uses the method to help create ECMAScript code that is passed to the requesting browser. The name of the hidden field is set to `myHiddenField` and its value is set to "Welcome to Microsoft!" The method calls the `myHiddenField` value when the user clicks a button on the page.
-
-> [!IMPORTANT]
-> This example has a hidden field, which is a potential security threat. By default, you should validate the value of a hidden field as you would the value of a text box. ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)).
-
- [!code-csharp[Page_RegisterHiddenField#1](~/snippets/csharp/VS_Snippets_WebNet/Page_RegisterHiddenField/CS/page_registerhiddenfield.cs.aspx#1)]
- [!code-vb[Page_RegisterHiddenField#1](~/snippets/visualbasic/VS_Snippets_WebNet/Page_RegisterHiddenField/VB/page_registerhiddenfield.vb.aspx#1)]
-
]]>
@@ -4461,20 +4426,8 @@ In most circumstances, do not set this property in code. The `LCID` attribute ca
method has been deprecated. Use the method in the class.
-
-
-## Examples
- The following code example demonstrates using the to access a script that responds when a client-side Submit button is clicked. When this event occurs, the registered ECMAScript code is executed on the client.
-
-> [!IMPORTANT]
-> This example has a hidden field, which is a potential security threat. By default, you should validate the value of a hidden field as you would the value of a text box. ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](https://learn.microsoft.com/previous-versions/aspnet/w1sw53ds(v=vs.100)).
-
- [!code-csharp[Page_RegisterHiddenField#2](~/snippets/csharp/VS_Snippets_WebNet/Page_RegisterHiddenField/CS/page_registerhiddenfield.cs.aspx#2)]
- [!code-vb[Page_RegisterHiddenField#2](~/snippets/visualbasic/VS_Snippets_WebNet/Page_RegisterHiddenField/VB/page_registerhiddenfield.vb.aspx#2)]
-
]]>
diff --git a/xml/System.Web.UI/ScriptReferenceBase.xml b/xml/System.Web.UI/ScriptReferenceBase.xml
index 49f4a16b5cc..b5fba16cd6b 100644
--- a/xml/System.Web.UI/ScriptReferenceBase.xml
+++ b/xml/System.Web.UI/ScriptReferenceBase.xml
@@ -177,14 +177,9 @@
property to `false` if you reference a script file in an assembly and the script file already contains code to call [Sys.Application.notifyScriptLoaded](https://msdn.microsoft.com/library/dd95aa94-34bb-45b6-ac06-1cb4031469c6). An error is thrown if [Sys.Application.notifyScriptLoaded](https://msdn.microsoft.com/library/dd95aa94-34bb-45b6-ac06-1cb4031469c6) method is called more than one time from a script file.
- If you reference a standalone script file that is not embedded in an assembly, you must include code at the end of the script file to call the [Sys.Application.notifyScriptLoaded](https://msdn.microsoft.com/library/dd95aa94-34bb-45b6-ac06-1cb4031469c6) method. The following example shows the code to include at the end of the script file.
-
-```javascript
-if(typeof(Sys) !== "undefined) Sys.Application.notifyScriptLoaded();
-```
+ If you reference a standalone script file that is not embedded in an assembly, you must include code at the end of the script file to call the [Sys.Application.notifyScriptLoaded](https://msdn.microsoft.com/library/dd95aa94-34bb-45b6-ac06-1cb4031469c6) method.
]]>
diff --git a/xml/System.Web.UI/ScriptResourceAttribute.xml b/xml/System.Web.UI/ScriptResourceAttribute.xml
index 5bc9325ed7c..d415a7fb764 100644
--- a/xml/System.Web.UI/ScriptResourceAttribute.xml
+++ b/xml/System.Web.UI/ScriptResourceAttribute.xml
@@ -23,26 +23,26 @@
Defines a resource in an assembly to be used from a client script file. This class cannot be inherited.
- class is valid only when you use it in assembly declarations. You use it to enable a specified embedded script resource in an assembly. You can define the name of the embedded script library, the name of the resource file for the script library, and the name that is used in a script file for retrieving the resource values. The class uses the properties in to determine the correct resource name for a script library. The property is used with a resource key to specify a resource.
-
+ class is valid only when you use it in assembly declarations. You use it to enable a specified embedded script resource in an assembly. You can define the name of the embedded script library, the name of the resource file for the script library, and the name that is used in a script file for retrieving the resource values. The class uses the properties in to determine the correct resource name for a script library. The property is used with a resource key to specify a resource.
+
> [!NOTE]
-> The class can be used only to identify text-based resources for JavaScript files. To associate a localized image (binary) file with a particular culture, consider storing only its URL as a localized resource, which then be resolved and loaded in script.
-
-
-
-## Examples
- The following example shows a attribute for a script file named CheckAnswer.js that uses resources from the VerificationResources resource files. The name `Answer` is used to reference these resources.
-
+> The class can be used only to identify text-based resources for JavaScript files. To associate a localized image (binary) file with a particular culture, consider storing only its URL as a localized resource, which then be resolved and loaded in script.
+
+
+
+## Examples
+ The following example shows a attribute for a script file named CheckAnswer.js that uses resources from the VerificationResources resource files. The name `Answer` is used to reference these resources.
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/cs/AssemblyInfo.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/vb/AssemblyInfo.vb" id="Snippet3":::
-
- The following example shows how to use the resources in client script. The resource keys (`Correct` and `Incorrect`) are prefixed with `Answer` to identify the script resource definition that contains the values.
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/vb/AssemblyInfo.vb" id="Snippet3":::
+
+ The following example shows how to use the resources in client script. The resource keys (`Correct` and `Incorrect`) are prefixed with `Answer` to identify the script resource definition that contains the values.
+
:::code language="javascript" source="~/snippets/csharp/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/cs/CheckAnswer.js" id="Snippet1":::
-
+
]]>
@@ -116,11 +116,11 @@
The name of the type to create for the values in the resource file.
Initializes a new instance of the class.
- method is typically called by using the attribute as an assembly attribute in the application's AssemblyInfo file.
-
+ method is typically called by using the attribute as an assembly attribute in the application's AssemblyInfo file.
+
]]>
@@ -153,18 +153,18 @@
Gets the name of the script library.The name of the script library.
- attribute for a script file named CheckAnswer.js that uses resources from the VerificationResources resource files. The name `Answer` is used to reference these resources. In this example, the property returns "LocalizingResources.CheckAnswer.js".
-
+ attribute for a script file named CheckAnswer.js that uses resources from the VerificationResources resource files. The name `Answer` is used to reference these resources. In this example, the property returns "LocalizingResources.CheckAnswer.js".
+
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/cs/AssemblyInfo.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/vb/AssemblyInfo.vb" id="Snippet3":::
-
- The following example shows how to use the resources in client script. The resource keys (`Correct` and `Incorrect`) are prefixed with `Answer` to identify the script resource definition that contains the values.
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/vb/AssemblyInfo.vb" id="Snippet3":::
+
+ The following example shows how to use the resources in client script. The resource keys (`Correct` and `Incorrect`) are prefixed with `Answer` to identify the script resource definition that contains the values.
+
:::code language="javascript" source="~/snippets/csharp/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/cs/CheckAnswer.js" id="Snippet1":::
-
+
]]>
@@ -198,21 +198,7 @@
Gets the name of the resource file for the script library.The name of the resource file for the script library.
-
- attribute for a script file named CheckAnswer.js that uses resources from the VerificationResources resource files. The name `Answer` is used to reference these resources. In this example, the property returns "LocalizingResources.VerificationResources". The file name extension is not included when you define the .
-
- :::code language="csharp" source="~/snippets/csharp/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/cs/AssemblyInfo.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/vb/AssemblyInfo.vb" id="Snippet3":::
-
- The following example shows how to use the resources in client script. The resource keys (`Correct` and `Incorrect`) are prefixed with `Answer` to identify the script resource definition that contains the values.
-
- :::code language="javascript" source="~/snippets/csharp/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/cs/CheckAnswer.js" id="Snippet1":::
-
- ]]>
-
+ To be added.
@@ -296,26 +282,13 @@
System.String
- Gets the name that is used when retrieving the values in the resource file.
- The name that is used in client script when retrieving the values in the resource file.
+ Gets the name that's used when retrieving the values in the resource file.
+ The name that's used in client script when retrieving the values in the resource file.
- property contains the value that is used for retrieving localized resources in client script. The client script must include the value and the key name for the resource to be localized.
-
-
-
-## Examples
- The following example shows a attribute for a script file named CheckAnswer.js that uses resources from the VerificationResources resource files. The name `Answer` is used to reference these resources. In this example, the property returns "Answer".
-
- :::code language="csharp" source="~/snippets/csharp/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/cs/AssemblyInfo.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/vb/AssemblyInfo.vb" id="Snippet3":::
-
- The following example shows how to use the resources in client script. The resource keys (`Correct` and `Incorrect`) are prefixed with `Answer` to identify the script resource definition that contains the values.
-
- :::code language="javascript" source="~/snippets/csharp/VS_Snippets_Atlas/LocalizingClientResourcesWalkthrough/cs/CheckAnswer.js" id="Snippet1":::
-
+ property contains the value that is used for retrieving localized resources in client script. The client script must include the value and the key name for the resource to be localized.
+
]]>
diff --git a/xml/System.Windows.Forms/Form.xml b/xml/System.Windows.Forms/Form.xml
index 9e137d9a1fc..f301636f42a 100644
--- a/xml/System.Windows.Forms/Form.xml
+++ b/xml/System.Windows.Forms/Form.xml
@@ -1413,10 +1413,8 @@
[!CAUTION]
-> The event is obsolete in the .NET Framework version 2.0; use the event instead.
+> The event is obsolete in .NET Framework version 2.0; use the event instead.
This event occurs after the form has been closed by the user or by the method of the form. To prevent a form from closing, handle the event and set the property of the passed to your event handler to `true`.
@@ -1429,15 +1427,6 @@
For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/).
-
-
-## Examples
- The following example demonstrates how to use the , , , , and members. To run the example, paste the following code in a form called `Form1` containing a called `Button1` and two controls called `Label1` and `Label2`.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.FormsActivate/CPP/form1.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Activate/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Form/Activate/form1.vb" id="Snippet1":::
-
]]>
@@ -1488,8 +1477,6 @@
[!CAUTION]
> The event is obsolete; use the event instead.
@@ -1507,15 +1494,6 @@
For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/).
-
-
-## Examples
- The following example uses to test if the text in a has changed. If it has, the user is asked whether to save the changes to a file.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Form.Closing/CPP/form1.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Closing/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Form/Closing/form1.vb" id="Snippet1":::
-
]]>
@@ -4699,15 +4677,6 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f
> [!CAUTION]
> The and methods are not called when the method is called to exit your application. If you have validation code in either of these methods that must be executed, you should call the method for each open form individually before calling the method.
-
-
-## Examples
- The following example demonstrates how to override the method in a class derived from .
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/System.Drawing.PointsAndSizes/CPP/form1.cpp" id="Snippet6":::
- :::code language="csharp" source="~/snippets/csharp/System.Drawing/Color/Overview/form1.cs" id="Snippet6":::
- :::code language="vb" source="~/snippets/visualbasic/System.Drawing/Color/Overview/form1.vb" id="Snippet6":::
-
]]>
@@ -4775,15 +4744,6 @@ By default Windows Forms anchors MDI children to the bottom left of the parent f
> [!CAUTION]
> The and methods are not called when the method is called to exit your application. If you have validation code in either of these methods that must be executed, you should call the method for each open form individually before calling the method.
-
-
-## Examples
- The following example uses to test if the text in a has changed. If it has, the user is asked whether to save the changes to a file.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Winforms/Form.Closing/CPP/form1.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/Form/Closing/form1.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/System.Windows.Forms/Form/Closing/form1.vb" id="Snippet1":::
-
]]>
diff --git a/xml/System.Windows.Media.Effects/BitmapEffect.xml b/xml/System.Windows.Media.Effects/BitmapEffect.xml
index 60e36828285..cd431442625 100644
--- a/xml/System.Windows.Media.Effects/BitmapEffect.xml
+++ b/xml/System.Windows.Media.Effects/BitmapEffect.xml
@@ -204,14 +204,6 @@
## Remarks
Framework interaction with custom effects is handled through an [IMILBitmapEffect](/windows/win32/api/mileffects/nn-mileffects-imilbitmapeffect) object. The outer effect is initialized with the custom effect through the method.
-
-
-## Examples
- The following example shows an implementation of that uses the method to retrieve a wrapper effect object.
-
- :::code language="csharp" source="~/snippets/csharp/System.Windows.Media.Effects/BitmapEffect/CreateBitmapEffectOuter/RGBFilterBitmapEffect.cs" id="Snippetcreateunmanagedeffect":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/RGBFilterEffectAssembly_snip/visualbasic/rgbfilterbitmapeffect.vb" id="Snippetcreateunmanagedeffect":::
-
]]>
@@ -252,17 +244,7 @@
When overridden in a derived class, creates a clone of the unmanaged effect.A handle to the unmanaged effect clone.
-
- method.
-
- :::code language="csharp" source="~/snippets/csharp/System.Windows.Media.Effects/BitmapEffect/CreateBitmapEffectOuter/RGBFilterBitmapEffect.cs" id="Snippetcreateunmanagedeffect":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/RGBFilterEffectAssembly_snip/visualbasic/rgbfilterbitmapeffect.vb" id="Snippetcreateunmanagedeffect":::
-
- ]]>
-
+ To be added.
@@ -347,17 +329,7 @@
The outer IMILBitmapEffect wrapper to initialize.
The inner IMILBitmapEffectPrimitive.
Initializes an IMILBitmapEffect handle obtained from with the given IMILBitmapEffectPrimitive.
-
- that uses the method to initialize the wrapper object with the custom effect.
-
- :::code language="csharp" source="~/snippets/csharp/System.Windows.Media.Effects/BitmapEffect/CreateBitmapEffectOuter/RGBFilterBitmapEffect.cs" id="Snippetcreateunmanagedeffect":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Wpf/RGBFilterEffectAssembly_snip/visualbasic/rgbfilterbitmapeffect.vb" id="Snippetcreateunmanagedeffect":::
-
- ]]>
-
+ To be added.
diff --git a/xml/System.Windows.Media/DrawingContext.xml b/xml/System.Windows.Media/DrawingContext.xml
index 54cb59dca59..672d433f363 100644
--- a/xml/System.Windows.Media/DrawingContext.xml
+++ b/xml/System.Windows.Media/DrawingContext.xml
@@ -27,28 +27,28 @@
Describes visual content using draw, push, and pop commands.
- to populate a or a with visual content.
-
- Although the draw methods appear similar to the draw methods of the type, they function very differently: is used with a retained mode graphics system, while the type is used with an immediate mode graphics system. When you use a object's draw commands, you are actually storing a set of rendering instructions (although the exact storage mechanism depends on the type of object that supplies the ) that will later be used by the graphics system; you are not drawing to the screen in real-time. For more information about how the Windows Presentation Foundation (WPF) graphics system works, see [WPF Graphics Rendering Overview](/dotnet/framework/wpf/graphics-multimedia/wpf-graphics-rendering-overview).
-
- You never directly instantiate a ; you can, however, acquire a drawing context from certain methods, such as and .
-
-
-
-## Examples
- The following example retrieves a from a and uses it to draw a rectangle.
-
+ to populate a or a with visual content.
+
+ Although the draw methods appear similar to the draw methods of the type, they function very differently: is used with a retained mode graphics system, while the type is used with an immediate mode graphics system. When you use a object's draw commands, you are actually storing a set of rendering instructions (although the exact storage mechanism depends on the type of object that supplies the ) that will later be used by the graphics system; you are not drawing to the screen in real-time. For more information about how the Windows Presentation Foundation (WPF) graphics system works, see [WPF Graphics Rendering Overview](/dotnet/framework/wpf/graphics-multimedia/wpf-graphics-rendering-overview).
+
+ You never directly instantiate a ; you can, however, acquire a drawing context from certain methods, such as and .
+
+
+
+## Examples
+ The following example retrieves a from a and uses it to draw a rectangle.
+
:::code language="csharp" source="~/snippets/csharp/System.Windows.Media/DrawingContext/Overview/Window1.xaml.cs" id="Snippet101":::
- :::code language="vb" source="~/snippets/visualbasic/System.Windows.Media/DrawingContext/Overview/window1.xaml.vb" id="Snippet101":::
-
- The next example demonstrates the , , and commands. The is obtained from a and displayed using an control.
-
+ :::code language="vb" source="~/snippets/visualbasic/System.Windows.Media/DrawingContext/Overview/window1.xaml.vb" id="Snippet101":::
+
+ The next example demonstrates the command. The is obtained from a and displayed using an control.
+
:::code language="csharp" source="~/snippets/csharp/System.Windows.Media/DrawingContext/Overview/PushEffectExample.cs" id="Snippetpusheffectexamplewholepage":::
- :::code language="vb" source="~/snippets/visualbasic/System.Windows.Media/DrawingContext/Overview/pusheffectexample.vb" id="Snippetpusheffectexamplewholepage":::
-
+ :::code language="vb" source="~/snippets/visualbasic/System.Windows.Media/DrawingContext/Overview/pusheffectexample.vb" id="Snippetpusheffectexamplewholepage":::
+
]]>
@@ -81,11 +81,11 @@
Closes the and flushes the content. Afterward, the cannot be modified.
- must be closed before its content can be rendered, but after it has been closed, it cannot be modified. This call does not require all Push calls to have been Popped.
-
+ must be closed before its content can be rendered, but after it has been closed, it cannot be modified. This call does not require all Push calls to have been Popped.
+
]]>This object has already been closed or disposed.
@@ -117,11 +117,11 @@
Releases all resources used by the .
- method instead.
-
+ method instead.
+
]]>The object has already been closed or disposed.
@@ -205,11 +205,11 @@
The vertical radius of the ellipse.
Draws an ellipse with the specified and .
-
@@ -257,11 +257,11 @@
The clock with which to animate the ellipse's y-radius, or for no animation. This clock must be created from an that can animate objects.
Draws an ellipse with the specified and and applies the specified animation clocks.
-
@@ -536,11 +536,11 @@
The rectangle to draw.
Draws a rectangle with the specified and . The pen and the brush can be .
-
@@ -580,11 +580,11 @@
The clock with which to animate the rectangle's size and dimensions, or for no animation. This clock must be created from an that can animate objects.
Draws a rectangle with the specified and and applies the specified animation clocks.
-
@@ -635,11 +635,11 @@
The radius in the Y dimension of the rounded corners. This value will be clamped to a value between 0 to /2.
Draws a rounded rectangle with the specified and .
-
@@ -687,11 +687,11 @@
The clock with which to animate the rectangle's value, or for no animation. This clock must be created from an that can animate values.
Draws a rounded rectangle with the specified and and applies the specified animation clocks.
-
@@ -770,11 +770,11 @@
The region in which to draw .
Draws a video into the specified region.
- command to draw a rectangle and fill it with a that contains media.
-
+ command to draw a rectangle and fill it with a that contains media.
+
]]>
@@ -812,11 +812,11 @@
The clock with which to animate the rectangle's size and dimensions, or for no animation. This clock must be created from an that can animate objects.
Draws a video into the specified region and applies the specified animation clock.
- command to draw a rectangle and fill it with a that contains media.
-
+ command to draw a rectangle and fill it with a that contains media.
+
]]>
@@ -847,23 +847,23 @@
Pops the last opacity mask, opacity, clip, effect, or transform operation that was pushed onto the drawing context.
- command.
-
+ command.
+
:::code language="csharp" source="~/snippets/csharp/System.Windows.Media/DrawingContext/Overview/PopExample.cs" id="Snippetpopexamplewholepage":::
- :::code language="vb" source="~/snippets/visualbasic/System.Windows.Media/DrawingContext/Overview/popexample.vb" id="Snippetpopexamplewholepage":::
-
- The following illustration shows this example's output:
-
- 
-
+ :::code language="vb" source="~/snippets/visualbasic/System.Windows.Media/DrawingContext/Overview/popexample.vb" id="Snippetpopexamplewholepage":::
+
+ The following illustration shows this example's output:
+
+ 
+
]]>
@@ -897,11 +897,11 @@
The clip region to apply to subsequent drawing commands.
Pushes the specified clip region onto the drawing context.
- command.
-
+ command.
+
]]>
@@ -943,19 +943,10 @@
The area to which the effect is applied, or if the effect is to be applied to the entire area of subsequent drawings.
Pushes the specified onto the drawing context.
- command.
-
-
-
-## Examples
- The following example demonstrates the , , and commands.
-
- :::code language="csharp" source="~/snippets/csharp/System.Windows.Media/DrawingContext/Overview/PushEffectExample.cs" id="Snippetpusheffectexamplewholepage":::
- :::code language="vb" source="~/snippets/visualbasic/System.Windows.Media/DrawingContext/Overview/pusheffectexample.vb" id="Snippetpusheffectexamplewholepage":::
-
+ command.
+
]]>
@@ -989,11 +980,11 @@
The guideline set to apply to subsequent drawing commands.
Pushes the specified onto the drawing context.
- operation.
-
+ operation.
+
]]>
@@ -1037,19 +1028,19 @@
The opacity factor to apply to subsequent drawing commands. This factor is cumulative with previous operations.
Pushes the specified opacity setting onto the drawing context.
- command.
-
-
-
-## Examples
- The following example demonstrates the , , and commands.
-
+ command.
+
+
+
+## Examples
+ The following example demonstrates the , , and commands.
+
:::code language="csharp" source="~/snippets/csharp/System.Windows.Media/DrawingContext/Overview/PushEffectExample.cs" id="Snippetpusheffectexamplewholepage":::
- :::code language="vb" source="~/snippets/visualbasic/System.Windows.Media/DrawingContext/Overview/pusheffectexample.vb" id="Snippetpusheffectexamplewholepage":::
-
+ :::code language="vb" source="~/snippets/visualbasic/System.Windows.Media/DrawingContext/Overview/pusheffectexample.vb" id="Snippetpusheffectexamplewholepage":::
+
]]>
@@ -1085,11 +1076,11 @@
The clock with which to animate the opacity value, or for no animation. This clock must be created from an that can animate values.
Pushes the specified opacity setting onto the drawing context and applies the specified animation clock.
- command.
-
+ command.
+
]]>
@@ -1123,13 +1114,13 @@
The opacity mask to apply to subsequent drawings. The alpha values of this brush determine the opacity of the drawing to which it is applied.
Pushes the specified opacity mask onto the drawing context.
- operation.
-
- For more information about creating opacity masks, see [Opacity Masks Overview](/dotnet/framework/wpf/graphics-multimedia/opacity-masks-overview).
-
+ operation.
+
+ For more information about creating opacity masks, see [Opacity Masks Overview](/dotnet/framework/wpf/graphics-multimedia/opacity-masks-overview).
+
]]>
@@ -1163,11 +1154,11 @@
The transform to apply to subsequent drawing commands.
Pushes the specified onto the drawing context.
- command.
-
+ command.
+
]]>
diff --git a/xml/System.Windows/UIElement.xml b/xml/System.Windows/UIElement.xml
index 6cb8cdefb3d..76a3950c521 100644
--- a/xml/System.Windows/UIElement.xml
+++ b/xml/System.Windows/UIElement.xml
@@ -975,7 +975,6 @@
is an abstract type, therefore the XAML usage requires an implemented derived class of , such as . Note that one implemented derived class is a collection type that allows you to specify more than one sequential , using a nested tag syntax.
No existing derived class of supports a type converter, so the XAML syntax that you use for this property is generally property element syntax.
@@ -983,17 +982,10 @@
## Dependency Property Information
-| Item | Value |
-|-----------------------------------|--------------------------------------------------------|
-|Identifier field||
-|Metadata properties set to `true`|None|
-
-
-
-## Examples
- The following example sets a bitmap effect, using .
-
- :::code language="csharp" source="~/snippets/csharp/System.Windows/UIElement/BitmapEffect/blurcodebehindexample.xaml.cs" id="Snippetcodebehindblurcodebehindexampleinline":::
+| Item | Value |
+|-----------------------------------|------------------------------------------------------|
+| Identifier field | |
+| Metadata properties set to `true` | None |
]]>
diff --git a/xml/System.Xml/XmlConvert.xml b/xml/System.Xml/XmlConvert.xml
index 35595913053..7c8df66bb27 100644
--- a/xml/System.Xml/XmlConvert.xml
+++ b/xml/System.Xml/XmlConvert.xml
@@ -908,23 +908,9 @@
[!NOTE]
> The method is obsolete in the 2.0 version of the .NET Framework and has been replaced by the method.
-
-
-## Examples
- The following example uses and `ToDateTime` to read strongly typed data.
-
- :::code language="csharp" source="~/snippets/csharp/System.Xml/XmlConvert/ToDateTime/readdata.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/XmlConvert.ToDouble/VB/readdata.vb" id="Snippet1":::
-
- The example uses the file, `orderData.xml`, as input.
-
- :::code language="xml" source="~/snippets/xml/VS_Snippets_Data/XmlConvert.ToDouble/XML/orderdata.xml" id="Snippet2":::
-
]]>
diff --git a/xml/System.Xml/XmlReaderSettings.xml b/xml/System.Xml/XmlReaderSettings.xml
index 4f07504c144..affdc335b00 100644
--- a/xml/System.Xml/XmlReaderSettings.xml
+++ b/xml/System.Xml/XmlReaderSettings.xml
@@ -1239,25 +1239,12 @@ There is an error in XML document (MaxCharactersInDocument, ).
throws an when any DTD content is encountered. Do not enable DTD processing if you are concerned about Denial of Service issues or if you are dealing with untrusted sources.
If you have DTD processing enabled, you can use the to restrict the resources that the can access. You can also design your application so that the XML processing is memory and time constrained. For example, configure time-out limits in your ASP.NET application.
This property is obsolete. Use instead. If you had set to its default value `true` set to `Prohibit`. If you had set to `false` set to `Parse`.
-
-
-## Examples
- The following example validates data using a DTD.
-
- :::code language="csharp" source="~/snippets/csharp/System.Xml/XmlReaderSettings/DtdProcessing/validdtd.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Data/XmlReaderSettings.DtdValidate/VB/validdtd.vb" id="Snippet1":::
-
- The example uses the itemDTD.xml file as input.
-
- :::code language="xml" source="~/snippets/xml/VS_Snippets_Data/XmlReaderSettings.DtdValidate/XML/itemDTD.xml" id="Snippet2":::
-
]]>