In this content I will talk about how to make a value little. Visible Facilities allows designers to preserve thoughts of value which can be loaded at a later time. This will preserve on retyping prevents of value that are used often. I also discover it very useful when I have to demonstrate value during demonstrations. Instead of entering everything stay, I discover it far simpler to simply add the value prevent by prevent using value thoughts.
Fallow the steps to create a code snippet using Visual Studio 2010.
Default Blank XML:
Default Blank XML:
Default snippet generated XML tags:
Modified XML tags.
Add the SQL Connection Code to ![CDATA[]]
xml version="1.0" encoding="utf-8" ?><CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> <Header>
<Title>SqlInsertTitle> <Author>RavindraAuthor> <Shortcut>SqlInsShortcut> <Description>Sql ConnectionDescription> <SnippetTypes>
<SnippetType>SurroundsWithSnippetType> <SnippetType>ExpansionSnippetType> SnippetTypes>
Header>
<Snippet>
<Declarations>
<Literal>
<ID>messageID> <Default>my functionDefault> Literal>
Declarations>
<Code Language="CSharp"> SqlConnection con = new SqlConnection();
try
{
con.Open();
SqlCommand cmd = con.CreateCommand();
cmd.CommandText = "";
cmd.Parameters.AddWithValue("", "");
cmd.Parameters.AddWithValue("", "");
cmd.Parameters.AddWithValue("", "");
cmd.ExecuteNonQuery();
}
catch (Exception)
{ throw;
}
finally
{
con.Close();
}]]>
Code>
Snippet>
CodeSnippet>
Snippet IntelliSense
Snippet generated C# code
SPONSORS:
No comments:
Post a Comment