This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void foobar(Type t) | |
{ | |
var listType = typeof(List<>); | |
var constructedListType = listType.MakeGenericType(t); | |
var instance = Activator.CreateInstance(constructedListType); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<UsingTask TaskName="TransformXml" AssemblyFile="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.Tasks.dll" /> | |
<Target Name="AfterCompile" Condition="exists('app.$(Configuration).config')"> | |
<!-- Generate transformed app config in the intermediate directory --> | |
<TransformXml Source="app.config" Destination="$(IntermediateOutputPath)$(TargetFileName).config" Transform="app.$(Configuration).config" /> | |
<!-- Force build process to use the transformed configuration file from now on. --> | |
<ItemGroup> | |
<AppConfigWithTargetPath Remove="app.config" /> | |
<AppConfigWithTargetPath Include="$(IntermediateOutputPath)$(TargetFileName).config"> | |
<TargetPath>$(TargetFileName).config</TargetPath> | |
</AppConfigWithTargetPath> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO $$ | |
DECLARE | |
all_tables CURSOR FOR SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'; | |
BEGIN | |
FOR table_record IN all_tables LOOP | |
EXECUTE 'DROP TABLE ' || table_record.table_name || ' CASCADE'; | |
END LOOP; | |
END $$; |
NewerOlder