Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 84075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:52:26+00:00 2026-05-10T21:52:26+00:00

I want to create a List of KeyValuePair s in a managed C++ project.

  • 0

I want to create a List of KeyValuePairs in a managed C++ project. Here is the syntax I’m using

List<KeyValuePair<String^, String^>^>^ thing; 

but I’m getting the following error:

error C3225: generic type argument for ‘T’ cannot be ‘System::Collections::Generic::KeyValuePair ^’, it must be a value type or a handle to a reference type

I basically want to do this (C#)

List<KeyValuePair<string, string>> thing; 

but in managed C++. Oh and in .Net 2.0. Any takers?

  • 1 1 Answer
  • 4 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T21:52:26+00:00Added an answer on May 10, 2026 at 9:52 pm

    KeyValuePair does not itself need to be a handle. Duh.

    Because it’s a value type, not a reference type (i.e. struct instead of class in C#).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a list within a list item on jQuery mobile here's
I want to create unorder list. UIwebView is good but it's very heavy (there
I want to create a List in an ActiveX component project in Visual Basic
I want to create a list with incremented ids and hrefs using jQuery. Is
I want to create a list of class instances that automatically updates itself following
I want to programatically create list on Sharepoint using Web Services. I tried Lists.AddList
I want to create a list of queues in C++ but the compiler gives
I want to create hiscore list, but I have trouble doing it. This is
I want to create a list with flash cs3 using the accordion component (the
I want to create a List<MyClass> with class MyClass { public string Name; public

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.