Russinovich Sysinternals Suite
procdump -ma <processName>
Russinovich Sysinternals Suite
procdump -ma <processName>
Filed under Uncategorized
3. Как найти любые из нескольких слов
Просто перечислите все подходящие варианты через вертикальный слеш: |. Google будет искать документы с любым из этих слов.
Пример:
[ананасы | рябчики | шампанское]
[дачные участки (рублевское | киевское | минское) шоссе]
4. Как найти слова в пределах одного предложения
Используйте оператор с красивым именем «амперсанд» — &. Если соединить слова амперсандом, Google найдет документы, где эти слова стоят в одном предложении.
Пример:
[памятник Пушкину & Псков]
5. Как найти документ, содержащий определённое слово
Поставьте перед нужным словом плюс, не отделяя его от слова пробелом. В запрос можно включить несколько обязательных слов.
Пример:
[Памятник Шолохову +бульвар]
6. Как исключить слово из поиска
Поставьте минус перед словом, которое вы не хотите видеть в ответах. Так можно исключить даже несколько слов:
Пример:
[мумий тролль мультфильм -рок -лагутенко]
[схемы вязания спицами -купить]
7. Как искать на определенном сайте
Для этого подойдет оператор site. Он позволяет прямо в запросе указать сайт, на котором нужно искать. Только обязательно поставьте после site двоеточие.
Пример:
[конституция рф site:consultant(точка)ru]
[маяковский окна site:lib(точка)ru]
8. Как искать документы определенного типа
Вам нужен оператор mime. Поставьте в запросе ext, двоеточие и затем тип документа, который вам нужен. Например, pdf или doc.
Пример:
[заявление на загранпаспорт ext:pdf]
9. Как искать на сайтах на определенном языке
С помощью оператора lang. После lang нужно поставить двоеточие и написать, на каком языке вам нужны документы. Если это русский язык, то нужно указать ru, если украинский — uk. Белорусский язык обозначается как be, английский — en, французский — fr.
Пример:
[void glClearColor lang:ru]
Filed under Search
#######################################################################
#Import the Server Manager command console to use later to add, remove, or query features or roles.
import-module servermanager
#Add Windows features or roles by passing the component name to the add-windowsfeature cmd. Use a comma to seperate multiple features.
# This example is installing default IIS and Windows Process Activation Service. Some components require a reboot before more can be installed.
add-windowsfeature Web-Server, WAS
#######################################################################
Basically copy that code into notepad and save it as .ps1 and that’s it. There is one caveat with this; with making no changes out of the box to Server 2008 powershell may be configured to restricted mode. That means no powershell scripts will run period. To get around that I went into my task sequence and during the State Restore phase I added a command line item called “Enable Powershell” it’s just running “powershell.exe -Command Set-ExecutionPolicy Unrestricted -force” or you could also use RemoteSigned. Then depending on your environment you can just copy that item and place it at the end to lock powershell back down if needed by setting back to Restricted or something else. The other item of note, if you are doing a LTI deployment or your PowerShell script is running from a UNC location you’ll need to add that location one of the more open IE zones during the build. I just added my deployment server to the Intranet zone because this is all happening prior to joining a domain. Even if you change the execution policy to unrestricted it will still prompt you to allow because it’s running from a remote location.
When I was talking to someone about this they asked about how did I know IIS is called Web-Server and Windows Process Activation Service was called WAS? Well, I used the query cmdlet to get all that and dumped it to a spreadsheet. I’ll include that info at the end of this post.
This post has been a little disjointed, so if anyone has questions feel free to ask or if people want some screen shots I could post those later. Here’s the dump of feature display names and short names:
Display Name | Name | |
[ ] Active Directory Certificate Services | AD-Certificate | |
[ ] Certification Authority | ADCS-Cert-Authority | |
[ ] Certification Authority WEB Enrollment | ADCS-WEB-Enrollment | |
[ ] Online Responder | ADCS-Online-Cert | |
[ ] Network Device Enrollment Service | ADCS-Device-Enrollment | |
[ ] Certificate Enrollment WEB Service | ADCS-Enroll-WEB-Svc | |
[ ] Certificate Enrollment Policy WEB Service | ADCS-Enroll-WEB-Pol | |
[ ] Active Directory Domain Services | AD-Domain-Services | |
[ ] Active Directory Domain Controller | ADDS-Domain-Controller | |
[ ] Identity Management for UNIX | ADDS-Identity-Mgmt | |
[ ] Server for Network Information Services | ADDS-NIS | |
[ ] Password Synchronization | ADDS-Password-Sync | |
[ ] Administration Tools | ADDS-IDMU-Tools | |
[ ] Active Directory Federation Services | AD-Federation-Services | |
[ ] Federation Service | ADFS-Federation | |
[ ] Federation Service Proxy | ADFS-Proxy | |
[ ] AD FS WEB Agents | ADFS-WEB-Agents | |
[ ] Claims-aware Agent | ADFS-Claims | |
[ ] Windows Token-based Agent | ADFS-Windows-Token | |
[ ] Active Directory Lightweight Directory Services | ADLDS | |
[ ] Active Directory Rights Management Services | ADRMS | |
[ ] Active Directory Rights Management Server | ADRMS-Server | |
[ ] Identity Federation Support | ADRMS-Identity | |
[ ] Application Server | Application-Server | |
[ ] .NET Framework 3.5.1 | AS-NET-Framework | |
[ ] WEB Server (IIS) Support | AS-WEB-Support | |
[ ] COM+ Network Access | AS-Ent-Services | |
[ ] TCP Port Sharing | AS-TCP-Port-Sharing | |
[ ] Windows Process Activation Service Support | AS-WAS-Support | |
[ ] HTTP Activation | AS-HTTP-Activation | |
[ ] Message Queuing Activation | AS-MSMQ-Activation | |
[ ] TCP Activation | AS-TCP-Activation | |
[ ] Named Pipes Activation | AS-Named-Pipes | |
[ ] Distributed Transactions | AS-Dist-Transaction | |
[ ] Incoming Remote Transactions | AS-Incoming-Trans | |
[ ] Outgoing Remote Transactions | AS-Outgoing-Trans | |
[ ] WS-Atomic Transactions | AS-WS-Atomic | |
[ ] DHCP Server | DHCP | |
[ ] DNS Server | DNS | |
[ ] Fax Server | Fax | |
[ ] File Services | File-Services | |
[ ] File Server | FS-FileServer | |
[ ] Distributed File System | FS-DFS | |
[ ] DFS Namespaces | FS-DFS-Namespace | |
[ ] DFS Replication | FS-DFS-Replication | |
[ ] File Server Resource Manager | FS-Resource-Manager | |
[ ] Services for Network File System | FS-NFS-Services | |
[ ] Windows Search Service | FS-Search-Service | |
[ ] Windows Server 2003 File Services | FS-Win2003-Services | |
[ ] Indexing Service | FS-Indexing-Service | |
[ ] BranchCache for network files | FS-BranchCache | |
[ ] Hyper-V | Hyper-V | |
[ ] Network Policy and Access Services | NPAS | |
[ ] Network Policy Server | NPAS-Policy-Server | |
[ ] Routing and Remote Access Services | NPAS-RRAS-Services | |
[ ] Remote Access Service | NPAS-RRAS | |
[ ] Routing | NPAS-Routing | |
[ ] Health Registration Authority | NPAS-Health | |
[ ] Host Credential Authorization Protocol | NPAS-Host-Cred | |
[ ] Print and Document Services | Print-Services | |
[ ] Print Server | Print-Server | |
[ ] LPD Service | Print-LPD-Service | |
[ ] Internet Printing | Print-Internet | |
[ ] Distributed Scan Server | Print-Scan-Server | |
[ ] Remote Desktop Services | Remote-Desktop-Services | |
[ ] Remote Desktop Session Host | RDS-RD-Server | |
[ ] Remote Desktop Virtualization Host | RDS-Virtualization | |
[ ] Remote Desktop Licensing | RDS-Licensing | |
[ ] Remote Desktop Connection Broker | RDS-Connection-Broker | |
[ ] Remote Desktop Gateway | RDS-Gateway | |
[ ] Remote Desktop WEB Access | RDS-WEB-Access | |
[ ] WEB Server (IIS) | WEB-Server | |
[ ] WEB Server | WEB-WEBServer | |
[ ] Common HTTP Features | WEB-Common-Http | |
[ ] Static Content | WEB-Static-Content | |
[ ] Default Document | WEB-Default-Doc | |
[ ] Directory Browsing | WEB-Dir-Browsing | |
[ ] HTTP Errors | WEB-Http-Errors | |
[ ] HTTP Redirection | WEB-Http-Redirect | |
[ ] WEBDAV Publishing | WEB-DAV-Publishing | |
[ ] Application Development | WEB-App-Dev | |
[ ] ASP.NET | WEB-Asp-Net | |
[ ] .NET Extensibility | WEB-Net-Ext | |
[ ] ASP | WEB-ASP | |
[ ] CGI | WEB-CGI | |
[ ] ISAPI Extensions | WEB-ISAPI-Ext | |
[ ] ISAPI Filters | WEB-ISAPI-Filter | |
[ ] Server Side Includes | WEB-Includes | |
[ ] Health and Diagnostics | WEB-Health | |
[ ] HTTP Logging | WEB-Http-Logging | |
[ ] Logging Tools | WEB-Log-Libraries | |
[ ] Request Monitor | WEB-Request-Monitor | |
[ ] Tracing | WEB-Http-Tracing | |
[ ] Custom Logging | WEB-Custom-Logging | |
[ ] ODBC Logging | WEB-ODBC-Logging | |
[ ] Security | WEB-Security | |
[ ] Basic Authentication | WEB-Basic-Auth | |
[ ] Windows Authentication | WEB-Windows-Auth | |
[ ] Digest Authentication | WEB-Digest-Auth | |
[ ] Client Certificate Mapping Authentic… | WEB-Client-Auth | |
[ ] IIS Client Certificate Mapping Authe… | WEB-Cert-Auth | |
[ ] URL Authorization | WEB-Url-Auth | |
[ ] Request Filtering | WEB-Filtering | |
[ ] IP and Domain Restrictions | WEB-IP-Security | |
[ ] Performance | WEB-Performance | |
[ ] Static Content Compression | WEB-Stat-Compression | |
[ ] Dynamic Content Compression | WEB-Dyn-Compression | |
[ ] Management Tools | WEB-Mgmt-Tools | |
[ ] IIS Management Console | WEB-Mgmt-Console | |
[ ] IIS Management Scripts and Tools | WEB-Scripting-Tools | |
[ ] Management Service | WEB-Mgmt-Service | |
[ ] IIS 6 Management Compatibility | WEB-Mgmt-Compat | |
[ ] IIS 6 Metabase Compatibility | WEB-Metabase | |
[ ] IIS 6 WMI Compatibility | WEB-WMI | |
[ ] IIS 6 Scripting Tools | WEB-Lgcy-Scripting | |
[ ] IIS 6 Management Console | WEB-Lgcy-Mgmt-Console | |
[ ] FTP Server | WEB-Ftp-Server | |
[ ] FTP Service | WEB-Ftp-Service | |
[ ] FTP Extensibility | WEB-Ftp-Ext | |
[ ] IIS Hostable WEB Core | WEB-WHC | |
[ ] Windows Deployment Services | WDS | |
[ ] Deployment Server | WDS-Deployment | |
[ ] Transport Server | WDS-Transport | |
[ ] Windows Server Update Services | OOB-WSUS | |
[ ] .NET Framework 3.5.1 Features | NET-Framework | |
[ ] .NET Framework 3.5.1 | NET-Framework-Core | |
[ ] WCF Activation | NET-Win-CFAC | |
[ ] HTTP Activation | NET-HTTP-Activation | |
[ ] Non-HTTP Activation | NET-Non-HTTP-Activ | |
[ ] Background Intelligent Transfer Service (BITS) | BITS | |
[ ] IIS Server Extension | BITS-IIS-Ext | |
[ ] BitLocker Drive Encryption | BitLocker | |
[ ] BranchCache | BranchCache | |
[ ] Connection Manager Administration Kit | CMAK | |
[ ] Desktop Experience | Desktop-Experience | |
[ ] DirectAccess Management Console | DAMC | |
[ ] Failover Clustering | Failover-Clustering | |
[ ] Group Policy Management | GPMC | |
[ ] Ink and Handwriting Services | Ink-Handwriting | |
[ ] Ink Support | IH-Ink-Support | |
[ ] Handwriting Recognition | IH-Handwriting | |
[ ] Internet Printing Client | Internet-Print-Client | |
[ ] Internet Storage Name Server | ISNS | |
[ ] LPR Port Monitor | LPR-Port-Monitor | |
[ ] Message Queuing | MSMQ | |
[ ] Message Queuing Services | MSMQ-Services | |
[ ] Message Queuing Server | MSMQ-Server | |
[ ] Directory Service Integration | MSMQ-Directory | |
[ ] Message Queuing Triggers | MSMQ-Triggers | |
[ ] HTTP Support | MSMQ-HTTP-Support | |
[ ] Multicasting Support | MSMQ-Multicasting | |
[ ] Routing Service | MSMQ-Routing | |
[ ] Message Queuing DCOM Proxy | MSMQ-DCOM | |
[ ] Multipath I/O | Multipath-IO | |
[ ] Network Load Balancing | NLB | |
[ ] Peer Name Resolution Protocol | PNRP | |
[ ] Quality Windows Audio Video Experience | qWave | |
[ ] Remote Assistance | Remote-Assistance | |
[ ] Remote Differential Compression | RDC | |
[ ] Remote Server Administration Tools | RSAT | |
[ ] Role Administration Tools | RSAT-Role-Tools | |
[ ] Active Directory Certificate Services Tools | RSAT-ADCS | |
[ ] Certification Authority Tools | RSAT-ADCS-Mgmt | |
[ ] Online Responder Tools | RSAT-Online-Responder | |
[ ] AD DS and AD LDS Tools | RSAT-AD-Tools | |
[ ] AD DS Tools | RSAT-ADDS | |
[ ] AD DS Snap-Ins and Command-Line … | RSAT-ADDS-Tools | |
[ ] Active Directory Administrative … | RSAT-AD-AdminCenter | |
[ ] Server for NIS Tools | RSAT-SNIS | |
[ ] AD LDS Snap-Ins and Command-Line Tools | RSAT-ADLDS | |
[ ] Active Directory module for Windows … | RSAT-AD-PowerShell | |
[ ] Active Directory Rights Management Servi… | RSAT-RMS | |
[ ] DHCP Server Tools | RSAT-DHCP | |
[ ] DNS Server Tools | RSAT-DNS-Server | |
[ ] Fax Server Tools | RSAT-Fax | |
[ ] File Services Tools | RSAT-File-Services | |
[ ] Distributed File System Tools | RSAT-DFS-Mgmt-Con | |
[ ] File Server Resource Manager Tools | RSAT-FSRM-Mgmt | |
[ ] Services for Network File System Tools | RSAT-NFS-Admin | |
[ ] Hyper-V Tools | RSAT-Hyper-V | |
[ ] Network Policy and Access Services Tools | RSAT-NPAS | |
[ ] Print and Document Services Tools | RSAT-Print-Services | |
[ ] Remote Desktop Services Tools | RSAT-RDS | |
[ ] Remote Desktop Session Host Tools | RSAT-RDS-RemoteApp | |
[ ] Remote Desktop Gateway Tools | RSAT-RDS-Gateway | |
[ ] Remote Desktop Licensing Tools | RSAT-RDS-Licensing | |
[ ] Remote Desktop Connection Broker Tools | RSAT-RDS-Conn-Broker | |
[ ] WEB Server (IIS) Tools | RSAT-WEB-Server | |
[ ] Windows Deployment Services Tools | RSAT-WDS | |
[ ] Feature Administration Tools | RSAT-Feature-Tools | |
[ ] BitLocker Drive Encryption Administratio… | RSAT-BitLocker | |
[ ] BitLocker Drive Encryption Tools | RSAT-Bitlocker-DriveEnc | |
[ ] BitLocker Recovery Password Viewer | RSAT-Bitlocker-RecPwd | |
[ ] BITS Server Extensions Tools | RSAT-Bits-Server | |
[ ] Failover Clustering Tools | RSAT-Clustering | |
[ ] Network Load Balancing Tools | RSAT-NLB | |
[ ] SMTP Server Tools | RSAT-SMTP | |
[ ] WINS Server Tools | RSAT-WINS | |
[ ] RPC over HTTP Proxy | RPC-over-HTTP-Proxy | |
[ ] Simple TCP/IP Services | Simple-TCPIP | |
[ ] SMTP Server | SMTP-Server | |
[ ] SNMP Services | SNMP-Services | |
[ ] SNMP Service | SNMP-Service | |
[ ] SNMP WMI Provider | SNMP-WMI-Provider | |
[ ] Storage Manager for SANs | Storage-Mgr-SANS | |
[ ] Subsystem for UNIX-based Applications | Subsystem-UNIX-Apps | |
[ ] Telnet Client | Telnet-Client | |
[ ] Telnet Server | Telnet-Server | |
[ ] TFTP Client | TFTP-Client | |
[ ] Windows Biometric Framework | Biometric-Framework | |
[ ] Windows Internal Database | Windows-Internal-DB | |
[ ] Windows PowerShell Integrated Scripting Environm… | PowerShell-ISE | |
[ ] Windows Process Activation Service | WAS | |
[ ] Process Model | WAS-Process-Model | |
[ ] .NET Environment | WAS-NET-Environment | |
[ ] Configuration APIs | WAS-Config-APIs | |
[ ] Windows Server Backup Features | Backup-Features | |
[ ] Windows Server Backup | Backup | |
[ ] Command-line Tools | Backup-Tools | |
[ ] Windows Server Migration Tools | Migration | |
[ ] Windows System Resource Manager | WSRM | |
[ ] Windows TIFF IFilter | TIFF-IFilter | |
[ ] WinRM IIS Extension | WinRM-IIS-Ext | |
[ ] WINS Server | WINS-Server | |
[ ] Wireless LAN Service | Wireless-Networking | |
[ ] XPS Viewer | XPS-Viewer |
Filed under PowerShell
Promoted list is a very cool!
public void CreatePromotedList(string webUrl, string listTitle, string listDescription)
{
/*
doclib; Document Library
xmlform; Form Library
webpagelib; Wiki Page Library
piclib; Picture Library
links; Links
announce; Announcements
contacts; Contacts
events; Calendar
promotedlinks; Promoted Links
discuss; Discussion Board
tasks; Tasks (2010)
hierarchy; Tasks
gantt; Project Tasks
issue; Issue Tracking
custlist; Custom List
ProductCatalogListTemplate; Product Catalog
gridlist; Custom List in Datasheet View
extlist; External List
survey; Survey
dcl; Data Connection Library
IWConvertedForms; Converted Forms
datasrcs; Data Sources
AccSrvAddApp; Access App
workflowProcess; Custom Workflow Process
Pages; Pages Library
nocodepublicwf; No Code Public Workflows
nocodewf; No Code Workflows
ReportList; Report Library
wrkflhis; Workflow History
KPIList; Status List
wfsvc;
AssetLibrary; Asset Library
*/
bool listExist = false;
foreach (SPList list in oWebsite.Lists)
{
if (list.Title == listTitle)
{
listExist = true;
break;
}
}
if (!listExist)
{
SPListTemplate listTemplate = oWebsite.ListTemplates[“Promoted Links”];
SPListCollection lists = oWebsite.Lists;
lists.Add(listTitle, listDescription, listTemplate);
}
}
Filed under C#, Sharepoint
ContentClass:STS_ListItem_Tasks
AssignedTo:Administrator
PercentComplete<100
ContentClass:STS_ListItem_Events
EventDate>1/1/2013
EventDate<31/12/2013
ContentClass:STS_Web
ContentClass:STS_Site
Training FileExtension=pdf Created>1/1/2013
sharepoint NEAR powershell FileExtension=pdf Created>1/1/2013
FileName=*citrix* Created>31.12.2011
sharepoint NEAR powershell FileExtension=pdf LastModifiedTime>1/12/2013
FileName=Обзор*
App NEAR JavaScript
WORDS(“Contacts”,”Customer”)
path:http://s29sps.region.cbr.ru/deprts/nadz
Filed under Sharepoint
$webApp = Get-SPWebApplication http://site
$webApp.SuiteBarBrandingElementHtml = “Site title”
$webApp.Update()
$webappl = “http://site”
$html='<a id=”ctl00_onetidProjectPropertyTitleGraphic” href=”http://site/”><img name=”onetidHeadbnnr0″ id=”ctl00_onetidHeadbnnr2″ alt=”Home Page Title” src=”http://Site/SiteCollectionImages/gu_logo.gif”/> </a><a id=”ctl00_onetidProjectPropertyTitleGraphic” href=”http://site”> </a> ‘
$webApp = Get-SPWebApplication $webappl
$webApp.SuiteBarBrandingElementHtml = $html
$webApp.Update()
$html='<a id=”ctl00_onetidProjectPropertyTitleGraphic” href=”http://site1/” unselectable=”on”>
<img name=”onetidHeadbnnr0″ id=”ctl00_onetidHeadbnnr2″ alt=”Home Page” src=”http:/site1/PublishingImages/gu_logo.gif” unselectable=”on”/> </a> ‘
$webappl = “http://s29search“
$html=” Центр поиска”
$webApp = Get-SPWebApplication $webappl
$webApp.SuiteBarBrandingElementHtml = $html
$webApp.Update()
Filed under Sharepoint
List<Func<int, int>> leval = new List<Func<int, int>>()
{
((int i) => {return i+1;}),
((int i) => { return i * i; }),
((int i) => { return i * i – i; })
};
foreach (var e in leval)
{
Console.WriteLine(e(5));
}
// тоже самое без скобок
List<Func<int, int>> leval = new List<Func<int, int>>()
{
i => i+1,
i => i * i,
i => i * i – i
};
foreach (var e in leval)
{
Console.WriteLine(e(5));
}
// еще один пример
Func<string, int> f =
(
s =>
{
int i = s.IndexOf(“rere”);
i = i + 2;
i *= i;
return i;
}
);
Console.WriteLine(“rere position is {0}”,f(“ksdl;aksrere”));
//————————————————————————————————————————-
class Film
{
public string Name { get; set; }
public int Year { get; set; }
}
…
var films = new List<Film>
{
new Film { Name = “Jaws”, Year = 1975 },
new Film { Name = “Singing in the Rain”, Year = 1952 },
new Film { Name = “Some Like it Hot”, Year = 1959 },
new Film { Name = “The Wizard of Oz”, Year = 1939 },
new Film { Name = “It’s a Wonderful Life”, Year = 1946 },
new Film { Name = “American Beauty”, Year = 1999 },
new Film { Name = “High Fidelity”, Year = 2000 },
new Film { Name = “The Usual Suspects”, Year = 1995 }
};
Action<Film> print =
film => Console.WriteLine(“Name={0}, Year={1}”,
film.Name, film.Year);
films.ForEach(print);
films.FindAll(film => film.Year < 1960)
.ForEach(print);
films.Sort((f1, f2) => f1.Name.CompareTo(f2.Name));
films.ForEach(print);
Filed under C#, Lambda, Visual Studio 2012
using System.IO
using(StreamWriter file = new StreamWriter(filename))
{
foreach(string line in list)
{
file.WriteLine(line);
}
}
Filed under Visual Studio 2012
private static void ParceDBF(FileInfo dbfFile)
{
StringBuilder ConnString = new StringBuilder(“”);
ConnString.Append(@”Provider=Microsoft.Jet.OLEDB.4.0;”);
ConnString.Append(@”Extended Properties=dBASE IV;”);
ConnString.Append(@”Data Source=”);
ConnString.Append(dbfFile.DirectoryName);
ConnString.Append(@”\;”);
OleDbConnection dbfc = new OleDbConnection();
dbfc.ConnectionString = ConnString.ToString();
dbfc.Open();
string dbfsql = “Select Iso_Dig,Iso_LAT3,DAT,Scale,Curse,Name_Rush,PR_Ecu from ” + dbfFile.FullName+”;”;
OleDbCommand cmd =new OleDbCommand(dbfsql,dbfc);
OleDbDataReader reader = cmd.ExecuteReader();
while (reader.HasRows)
{
while (reader.Read())
{
var dbrow = new
{
iso_dig = reader.GetString(0),
iso_Lat = reader.GetString(1),
dat = reader.GetDateTime(2),
scale = reader.GetDouble(3),
curse = reader.GetDouble(4),
name_rush = reader.GetString(5)
};
Console.WriteLine(“{0}\t{1}\t{2}\t{3}\t{4}\t{5} “, dbrow.iso_dig, dbrow.iso_Lat, dbrow.dat, dbrow.scale, dbrow.curse, dbrow.name_rush);
}
reader.NextResult();
}
}
Filed under DBF, Visual Studio 2012
By default the following code snippets are included in Visual Studio.
Name (or shortcut) |
Description |
Valid locations to insert snippet |
#if |
Anywhere. |
|
#region |
Creates a #region directive and a #endregion directive. |
Anywhere. |
~ |
Creates a destructor for the containing class. |
Inside a class. |
attribute |
Creates a declaration for a class that derives from Attribute. |
Inside a namespace (including the global namespace), a class, or a struct. |
checked |
Creates a checked block. |
Inside a method, an indexer, a property accessor, or an event accessor. |
class |
Creates a class declaration. |
Inside a namespace (including the global namespace), a class, or a struct. |
ctor |
Creates a constructor for the containing class. |
Inside a class. |
cw |
Creates a call to WriteLine. |
Inside a method, an indexer, a property accessor, or an event accessor. |
do |
Creates a do while loop. |
Inside a method, an indexer, a property accessor, or an event accessor. |
else |
Creates an else block. |
Inside a method, an indexer, a property accessor, or an event accessor. |
enum |
Creates an enum declaration. |
Inside a namespace (including the global namespace), a class, or a struct. |
equals |
Creates a method declaration that overrides the Equals method defined in the Object class. |
Inside a class or a struct. |
exception |
Creates a declaration for a class that derives from an exception (Exception by default). |
Inside a namespace (including the global namespace), a class, or a struct. |
for |
Creates a for loop. |
Inside a method, an indexer, a property accessor, or an event accessor. |
foreach |
Creates a foreach loop. |
Inside a method, an indexer, a property accessor, or an event accessor. |
forr |
Creates a for loop that decrements the loop variable after each iteration. |
Inside a method, an indexer, a property accessor, or an event accessor. |
if |
Creates an if block. |
Inside a method, an indexer, a property accessor, or an event accessor. |
indexer |
Creates an indexer declaration. |
Inside a class or a struct. |
interface |
Creates an interface declaration. |
Inside a namespace (including the global namespace), a class, or a struct. |
invoke |
Creates a block that safely invokes an event. |
Inside a method, an indexer, a property accessor, or an event accessor. |
iterator |
Creates an iterator. |
Inside a class or a struct. |
iterindex |
Creates a “named” iterator and indexer pair by using a nested class. |
Inside a class or a struct. |
lock |
Creates a lock block. |
Inside a method, an indexer, a property accessor, or an event accessor. |
mbox |
Creates a call to MessageBox.Show. You may have to add a reference to System.Windows.Forms.dll. |
Inside a method, an indexer, a property accessor, or an event accessor. |
namespace |
Creates a namespace declaration. |
Inside a namespace (including the global namespace). |
prop |
Creates an auto-implemented property declaration. |
Inside a class or a struct. |
propfull |
Creates a property declaration with get and set accessors. |
Inside a class or a struct. |
propg |
Creates a read-only auto-implemented property with a private “set” accessor. |
Inside a class or a struct. |
sim |
Inside a class or a struct. |
|
struct |
Creates a struct declaration. |
Inside a namespace (including the global namespace), a class, or a struct. |
svm |
Inside a class or a struct. |
|
switch |
Creates a switch block. |
Inside a method, an indexer, a property accessor, or an event accessor. |
try |
Creates a try-catch block. |
Inside a method, an indexer, a property accessor, or an event accessor. |
tryf |
Creates a try-finally block. |
Inside a method, an indexer, a property accessor, or an event accessor. |
unchecked |
Creates an unchecked block. |
Inside a method, an indexer, a property accessor, or an event accessor. |
unsafe |
Creates an unsafe block. |
Inside a method, an indexer, a property accessor, or an event accessor. |
using |
Creates a using directive. |
Inside a namespace (including the global namespace). |
while |
Creates a while loop. |
Inside a method, an indexer, a property accessor, or an event accessor. |
Filed under Visual Studio 2012