The Artima Developer Community
Sponsored Link

.NET Buzz Forum
A few generics terms

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Eric Gunnerson

Posts: 1006
Nickname: ericgu
Registered: Aug, 2003

Eric Gunnerson is a program manager on the Visual C# team
A few generics terms Posted: Sep 3, 2003 1:41 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Eric Gunnerson.
Original Post: A few generics terms
Feed Title: Eric Gunnerson's C# Compendium
Feed URL: /msdnerror.htm?aspxerrorpath=/ericgu/Rss.aspx
Feed Description: Eric comments on C#, programming and dotnet in general, and the aerodynamic characteristics of the red-nosed flying squirrel of the Lesser Antilles
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Eric Gunnerson
Latest Posts From Eric Gunnerson's C# Compendium

Advertisement

I've been diving into generics a bit more deeply, and I'd like to share some of the new terminology that will be floating around.

Open Type

An open type is a generic type that you've defined. List<T> is a good example. It's called "open" because it's not fully defined without knowing what T is, and therefore you can never have an instance of this type.

Type Parameter

The type placeholder that you use when writing a generic type. In List<T>, T is the type parameter.

Constructed Type

A constructed type is what you get when you specify a type for a type parameter. List<int> is a constructed type, and you can create instances of it.

Type Argument

The actual type you use instead of the type parameter when creating a construct type . In List<int>, int is the type argument.

Generic Method

A method that has a type parameter on it.

static int Process<T>(T t);

is an example

Arity

Strictly speaking, the number of parameters to a method. In generic terms, it's the number of type parameters on a generic type or method. ArrayList has an arity of zero, while List<T> has an arity of one.

Read: A few generics terms

Topic: Blogger Tech Meet-Up (Update) Previous Topic   Next Topic Topic: eWeek reviews NewsGator

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use