473,386 Members | 1,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

generic syntax problem

I try to write the following line in a syntaxically correct way, but I can't
find it!!!

List::Enumerator<FontCache^>^ fce = fontCache->GetEnumerator();

what's the right syntax?!!?
Nov 17 '05 #1
2 928
oops...
I have a Dictionary<Font^, FontCache^>^ fontCache;

and I want:
Dictionary.KeyCollection.Enumerator<TKey, TValue> GetEnumerator();

but even though this is copied from the C++ section of the documentation,
that doesn't compile :-(

"Lloyd Dupont" <net.galador@ld> wrote in message
news:uI**************@tk2msftngp13.phx.gbl...
I try to write the following line in a syntaxically correct way, but I
can't find it!!!

List::Enumerator<FontCache^>^ fce = fontCache->GetEnumerator();

what's the right syntax?!!?

Nov 17 '05 #2
found it!!
unlike the documentation which says:
Dictionary.KeyCollection.Enumerator<TKey, TValue> GetEnumerator();
it is:
Dictionary<Font^, FontCache^>::KeyCollection::Enumerator^
"Lloyd Dupont" <net.galador@ld> wrote in message
news:uI**************@tk2msftngp13.phx.gbl...
I try to write the following line in a syntaxically correct way, but I
can't find it!!!

List::Enumerator<FontCache^>^ fce = fontCache->GetEnumerator();

what's the right syntax?!!?

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Urs Eichmann | last post by:
While experimenting with the Feb CTP Edition of VB 2005, I came across "generic procedures". You can write: Public Class Foo Public Sub MySub(Of tDisp As IDisposable)(ByVal vMyParm As Integer)...
3
by: KH | last post by:
I can't seem to figure this one out... I've searched MSDN and Goog, and made my best guesses to no avail,, so help would be much appreciated! public ref class T sealed : public...
25
by: Lars | last post by:
Hi, I have a base class holding a generic list that needs to be accessed by both the base class and its subclasses. What is the best solution to this? I am fairly new to generics, but I am...
9
by: mps | last post by:
I want to define a class that has a generic parameter that is itself a generic class. For example, if I have a generic IQueue<Tinterface, and class A wants to make use of a generic class that...
2
by: Edward Diener | last post by:
Following the example in the help for the generic List class, which shows the Serializable attribute being used on the generic class, like so: generic<typename T> public ref class List :...
13
by: rkausch | last post by:
Hello everyone, I'm writing because I'm frustrated with the implementation of C#'s generics, and need a workaround. I come from a Java background, and am currently writing a portion of an...
0
by: epoxyparser | last post by:
Hi all, I work as a glue coder and often have to interface existing mechanisms with other platforms. Creating bridge code between command-line functionality and desktop GUIs takes up a lot of that...
3
by: Boris | last post by:
I have a class which should like this ideally: generic <typename T> public ref class ManagedClass { T ^managedMember; UnmanagedClass<U*unmanagedMember; }; I actually would like to specify...
3
by: Łukasz | last post by:
I have project that uses managed c++ where I use c - library, this library contains some variables named generic, during compilation I get error: Error 1 error C2146: syntax error : missing ';'...
0
by: SimonDotException | last post by:
I've written an abstract base type which uses generics to provide XML serialization and deserialization methods for use by its derived types, but I'm seemingly unable to write it in a way which...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.