1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Anna007 [38]
2 years ago
10

Create a dictionary with types as integer and string.

Computers and Technology
1 answer:
Airida [17]2 years ago
7 0

Answer:

In c#  Dictionary is the collection of keys and value .The dictionary is a generic collection class which is in the System.Collection.Generics namespace. we can represent dictionary like that Dictionary<TKey, TValue> where TKey represent the type of key and TValue is the type of TValue.

Following are the example which represent dictionary as integer and string

using System.Collections.Generic;  // namespace

class Test // class test

{

   static void Main()  // main method

   {

       

       var ob = new Dictionary< int,string>();  // type integer and string

       dictionary.Add( 2,"hello");

       dictionary.Add(143,"hello1);

       // The dictionary has 2 pairs.

       Console.WriteLine("DICTIONARY 1 " + ob.Count);

}

}

Output:

DICTIONARY 1 :2

Explanation:

In this program we create a dictionary generic class which is integer and string type after that we add the elements in the dictionary by   "dictionary.Add method " and finally print the count of dictionary

You might be interested in
Which type of memory helps in reading as well as writing data?
Anuta_ua [19.1K]

The read-write type of memory helps in reading as well as writing data. This computer memory is used by users to continually update the data (to access (read from) or alter (write to) ) that is held on hardware storage devices. Internal or external hard disk drives, rewritable CDs or small flash drives can be all physical setups of read-write memory.

6 0
3 years ago
2. Why do old video games have large pixels and images with jagged edges?
egoroff_w [7]

Answer:

A

Explanation:

cuz yea

3 0
1 year ago
About "How can computer help us in our life?​
Nitella [24]

Answer:

Explanation:

Computer also facilitate comfort to our life and provides convenience. For transportation, it facilitate the way people travel. Airways, Roadways and waterways uses computers to control their operation. It saves time and relieve severity of traveling difficulties.

6 0
3 years ago
Is this statement true or false? You can apply only one of these at a time: underline, bold, or italics. true false
Lelechka [254]
I think false not sure but let other people help u answer and u can decide
8 0
3 years ago
Page No
ratelena [41]

Answer:

ila bgfffsg hqhffa hhfw ygga gha yqvvty1uh' fttyavt h5tfauv gtta76rq

5 0
3 years ago
Other questions:
  • The concept of plug and play" is demonstrated by which of the following
    15·1 answer
  • The principle of time preference requries a larger payment in the future than the present. Which situation best illustrates this
    12·1 answer
  • Which type of interview is conducted in a format where the interviewee is questioned and presented to a panel of individuals?
    7·2 answers
  • 120
    14·1 answer
  • Giải thích mục đích của các thao tác open() và close().
    6·2 answers
  • Write a program that prompts the user to enter their name store this value in a variable called name Prompt the user for their c
    10·1 answer
  • Which of the following parameters is optional sample(a,b,c,d=7
    9·1 answer
  • Why do meteorologists use data such as temperature, wind speed, and air
    9·1 answer
  • You hide three worksheets in a workbook and need to unhide them. How can you accomplish this?.
    11·1 answer
  • Web résumés allow you to include extra graphics and images that you would not include in a traditional résumé. please select the
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!