473,378 Members | 1,492 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,378 software developers and data experts.

Creation Generic class

Hi,

I have some syntax problems creating my own generic class.

my code:

public abstract class IndexBase<T> {

private Dictionary<T, MyBaseType> _dict;

public IndexBase() {
_dict = new Dictionary<T, MyBaseType>(); //this one is going wrong
}
}

During compilation i get the followin error :
Dictionary<T, MyBaseType> is a 'type' but is used as a 'variable'

How can I fix this.

Thanx
Frank Vanderlinden

Nov 17 '05 #1
0 1461

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

Similar topics

6
by: Mike Monagle | last post by:
I'm working on the client side of a distributed application that uses what I call an XML over quasi-HTTP protocol. The client and server are connected with a single persistent socket and exchange...
3
by: Dean Arpajian | last post by:
Looking to find info/ libs on creating (small) video files. Basically what I'm looking for is a tutorial for constructing a short video... (nothing nasty: output from a transmission line...
1
by: Ole Andre Karlson | last post by:
Hi Im using the generic constructs provided by the Gyro installation. I want to create an object of a generic class parameter, my code goes something like this: class Node<T> where T :...
1
by: andrew queisser | last post by:
I've been trying to dynamically create a class DevT that's derived from a generic base GenBase<T>. It doesn't seem to work. I'm attaching a code sample below that illustrates the problem. ...
0
by: Frank VDL | last post by:
Hi, I have some syntax problems creating my own generic class. my code: public abstract class IndexBase<T> { private Dictionary<T, MyBaseType> _dict;
14
by: Bert Vandenberghe | last post by:
Hi, I was wondering if there are any best practices on the creation of webmethods? I'll try to explain this a little more: My problem is that we are changing an existing (large) DCOM application...
9
by: Gregor Horvath | last post by:
Hi, I want to reference a class itself in its body: class SomeElement(object): def __init__(self, mycontainer): self.mycontainer=mycontainer class SomeContainer(object): a =...
9
by: glomde | last post by:
Hi I wonder if you can set what subclass a class should have at instance creation. The problem is that I have something like: class CoreLang(): def AssignVar(self, var, value): pass class...
2
by: jon | last post by:
I'm trying to write a block of code that can create an instance of a generic object, with the Type coming in as a dynamic string. It isn't working yet. Any advice how I can dynamically create the...
0
tlhintoq
by: tlhintoq | last post by:
My project involves reading magstripe cards, capturing an ID number, then spinning off to do some other things including taking a photograph. 99% of this is done and good. All early phases of work...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.