您好我想創建一個Visual Studio代碼段,我可以有預定義的值來......在VS如何創建參數2010個片段
例如
<Timeline AutoPlay="$True|FALSE$">
有沒有辦法做到這個?
是否有一個除Default以外的標籤可以添加可能的值?
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/CodeSnippet">
<CodeSnippet>
<Header>
<!-- Add Header information here -->
</Header>
<Snippet>
<!-- Add additional Snippet information here -->
<Declarations>
<Literal>
<ID>SqlConnString</ID>
<ToolTip>Replace with a SQL connection string.</ToolTip>
**<Value>"Value1"</Value>
<Value>"Value2"</Value>**
<Default>"SQL connection string"</Default>
</Literal>
<Object>
<ID>SqlConnection</ID>
<Type>System.Data.SqlClient.SqlConnection</Type>
<ToolTip>Replace with a connection object in your application.</ToolTip>
<Default>dcConnection</Default>
</Object>
</Declarations>
<Code Language="CSharp">
<![CDATA[
daCustomers = new SqlClient.SqlDataAdapter();
selectCommand = new SqlClient.SqlCommand($SqlConnString$);
daCustomers.SelectCommand = selectCommand;
daCustomers.SelectCommand.Connection = $SqlConnection$;
]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
好設計的標誌。你可以無休止地想出你想包括的東西。好的設計就是知道要拋棄什麼*。片段是爲程序員設計的。 – 2012-02-16 00:28:03
是的,這就是爲什麼你添加更多的功能,沒有人實際上需要所有的MS Office功能,但有些人實際上做... – Astronaut 2012-02-16 09:44:46