Click here to Skip to main content
15,892,804 members
Articles / Programming Languages / C#

Basics of .NET Collections in C#

Rate me:
Please Sign up or sign in to vote.
3.46/5 (32 votes)
10 Dec 2008CPOL6 min read 326.3K   2.6K   73  
This article focuses on managing collections in .NET Framework 2.0.
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>8.0.50727</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{A0568DE8-3BCD-4643-93A6-43549BD6DE0B}</ProjectGuid>
    <OutputType>WinExe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>DotNetCollections</RootNamespace>
    <AssemblyName>DotNetCollections</AssemblyName>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Deployment" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="CollectionsExp\FrmIcollection.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="CollectionsExp\FrmIcollection.Designer.cs">
      <DependentUpon>FrmIcollection.cs</DependentUpon>
    </Compile>
    <Compile Include="CollectionsExp\FrmIDictionary.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="CollectionsExp\FrmIDictionary.Designer.cs">
      <DependentUpon>FrmIDictionary.cs</DependentUpon>
    </Compile>
    <Compile Include="CollectionsExp\FrmIEnumberable.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="CollectionsExp\FrmIEnumberable.Designer.cs">
      <DependentUpon>FrmIEnumberable.cs</DependentUpon>
    </Compile>
    <Compile Include="CollectionsExp\FrmObject.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="CollectionsExp\FrmObject.Designer.cs">
      <DependentUpon>FrmObject.cs</DependentUpon>
    </Compile>
    <Compile Include="CollectionsExp\FrmIList.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="CollectionsExp\FrmIList.Designer.cs">
      <DependentUpon>FrmIList.cs</DependentUpon>
    </Compile>
    <Compile Include="CollectionsExp\Person.cs" />
    <Compile Include="MDIParent1.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="MDIParent1.Designer.cs">
      <DependentUpon>MDIParent1.cs</DependentUpon>
    </Compile>
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <EmbeddedResource Include="CollectionsExp\FrmIcollection.resx">
      <SubType>Designer</SubType>
      <DependentUpon>FrmIcollection.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="CollectionsExp\FrmIDictionary.resx">
      <SubType>Designer</SubType>
      <DependentUpon>FrmIDictionary.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="CollectionsExp\FrmIEnumberable.resx">
      <SubType>Designer</SubType>
      <DependentUpon>FrmIEnumberable.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="CollectionsExp\FrmObject.resx">
      <SubType>Designer</SubType>
      <DependentUpon>FrmObject.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="CollectionsExp\FrmIList.resx">
      <SubType>Designer</SubType>
      <DependentUpon>FrmIList.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="MDIParent1.resx">
      <SubType>Designer</SubType>
      <DependentUpon>MDIParent1.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="Properties\Resources.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
      <SubType>Designer</SubType>
    </EmbeddedResource>
    <Compile Include="Properties\Resources.Designer.cs">
      <AutoGen>True</AutoGen>
      <DependentUpon>Resources.resx</DependentUpon>
      <DesignTime>True</DesignTime>
    </Compile>
    <None Include="Properties\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
    </None>
    <Compile Include="Properties\Settings.Designer.cs">
      <AutoGen>True</AutoGen>
      <DependentUpon>Settings.settings</DependentUpon>
      <DesignTimeSharedInput>True</DesignTimeSharedInput>
    </Compile>
    <Compile Include="Utility.cs" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Chief Technology Officer
Pakistan Pakistan
Passion and positive dedication is essential part of success. I believe on hardworking and sharing knowledge with others. I always try to be a better than I am and think positive for positive result.

My Blogs

My Linked-In Profile

Comments and Discussions