|
by: RYoung |
last post by:
Hello all,
Given this C# generic class definition:
class Command<Key, Data>
{
BerkeleyParameter<Key> key;
BerkeleyParameter<Data> data;
public void AddParameters(BerkeleyParameter<Key> key,
|
by: RFOG |
last post by:
Hi all!
I need a class that will be capable to enumerate some internal data, then
my idea is to implement "for each" loop access. Doc says that I've to inherit
form IEnumerable, but then compiler says
"Error 1 error C2955: 'System::Collections::Generic::IEnumerable' : use of
class generic requires generic argument list"
I understand that my class have to be a generic class, but I don't need that.
|
by: Rune Vistnes |
last post by:
Hey,
I am trying to wrap an unmanaged library in managed c++ so that I can use
this library in other .NET languages, such as C#. I've been successful for
the most part this far, but I'm having a hard time figuring out how to wrap
template classes. I'm getting an C3231 compile error when I try to use the
generic type as a template type.
Here's an example from the MSDN C3231 compile error site:
|
by: AdawayNoSpam |
last post by:
Said that I have the following class
Class MyRootClass(Of T)
End Class
Class MySubClass1(Of T)
Inherits MyRootClass(Of T)
End Class
|
by: Hyun-jik Bae |
last post by:
Is that not allowed to assume generic type numeric type? As far as I've
tried, I got an error with the following code:
public class AAA<T>
{
public int Foo(T a)
{
return a; // error: Cannot implicitly convert type 'T' to 'int'
}
}
|
|
by: Andrus |
last post by:
public class BusinessObjectGeneric<EntityType: BusinessObject
where EntityType : BusinessEntity, new() {
public BusinessObjectGeneric<EntityType() {
}
.....
causes error in constructor declaration:
|
by: Egghead |
last post by:
Hi all,
Can someone kindly enough point me to some situations that we shall or
"must" use Generic Class?
I can foresee the Generic Method is powerful, but I can not find a single
situation that I will need the Generic Class, given there are so many other
options.
--
cheers,
|
by: fig000 |
last post by:
HI,
I'm new to generics. I've written a simple class to which I'm
passing a generic list. I'm able to pass the list and even pass the
type of the list so I can use it to traverse it. It's a generic list
of business objects. I'm able to see that the type is the correct one
in the debugger.
However when I try to traverse the list using the type I can't
compile. The same type variable I've verified as being passed
|
by: raylopez99 |
last post by:
Here is an example of a home grown generic class, representing a pair
of values. Adapted from Jon Skeet's book "C# In Depth".
The generic class is "sealed" for some reason (I think for
performance) so you cannot derive from it, but that's optional. The
main thing in this example is to show the right format for using these
generic classes, which was not present in the code snippet in Skeet's
book.
Does anybody know why the .Equals...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|