|
Thanks for the answers folks. Sorry I got into the area. All I can say is that I'm very new at this.
The answers given have helped greatly. Thanks again.
|
|
|
|
|
When I derive a generic collection from another custom generic class, the signature is creating a lot of problems for me.
English:
Build a GenColl (derived from keyedCollection ) containing elements of a GenElement.
- The compiler tells me to use an identifier in the signature and not the type?!?!
- and when I use place holder for types, it asks for reference namespace??
_______________________________________________________
The actual generic classes (simplified for easy reading)
// simple - works, the element or base construct
public class GenElement<Key, Value>{}
// this doesnt work, it is a collection of the above generic class
// I am not sure of what the signature should be... tried many combo
public class GenCollection <Guid, GenElement<<Key, Value>> : KeyedCollection<Guid, <Key, Value>>
{
// rest of the implementation blah blah
// with abstract over rides
}
^ ^
-The problem is, if I include the type place holders Key, Value in the
definition (public class GenCollection <Guid, GenElement<<Key, Value>> ), the complier complains that GenElement should be an identifier and not a type? if I removed the type place holders (public class GenCollection <Guid, GenElement>) its just fine, but doesnt see that GenCollection contains a GenElement
-can some help me resolve this. What should I do to get a generic collection GenCollection container that contains genElement (which further has two typePlace holders, key and value GenElement<<Key, Value>)?
-How do I, in the definition tie the Guid to the Key, is it possible?
-- modified at 10:28 Tuesday 27th February, 2007
|
|
|
|
|
Can you post it with the HTML tags turned off because all the < and > signs are garbled.
Perhaps what you want is (complete guess here because the code isn't visible):
public class GenElement<TKey, TValue> : KeyedCollection<TKey, TValue>
{
}
|
|
|
|
|
I turned off the HTML tags but how do I get the yellow?
|
|
|
|
|
Use "pre"
bla
bla
bla
Will not work if you "Ignor HTML tags..."
|
|
|
|
|
I'm sure most of you have had this problem. OpenFileDialog in Windows CE is restricted to the "My Documents" directoy level. Does anyone know of a quality go around that I can use. Need to get one fast for prototyping new portable PCs.
Functionally challenged...
|
|
|
|
|
Change th InitialDirectory property of the OpenFileDialog
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
Hey guys whats going on ?
I have a form that I fill in with some info and I save them to my database, now I want to creat a crystal report and then print the information (Shown on the report), I'm new in this so could you help me out and give me any helpful link or article possible !!!
Thanx
Mr.K
|
|
|
|
|
|
Hi,
To use Crystal Report in .net is not much complex. steps involved are---
1. Add a new Window Form in your project.
2. Put Control From Tool box-->Crystral Report--->Crystal Report Viewer.
3. Click on Show Data Source Control from Standard Tool bar. It will show the existing data Sets if any. Otherwise generate the Data set.
4. Follow the next steps.......
5. Run the Report Viewer.
Now u can call this Report Viewer Form on the Click of any button.
Hope after trying this you will be able to view the Report.
All the Best !
Binod K.
|
|
|
|
|
Have anyone an idea how can switch between two properties(Resources.resx, Settings.settings)
|
|
|
|
|
I don't even know what this means ? Do you want to swap their values ? You need a third variable.
int a = 1;
int b = 2;
// swap
int c = a;
a = b;
b = c;
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I want to build two programs with the same code but different designs.
|
|
|
|
|
Eh? That makes no sense whatsoever. If you have the same code, it's the same program - you can't have a different design.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
You want to reuse code ? Put the code you want to reuse in a dll. By the way, nothing you're saying is making sense, I am making guesses. Try to explain what you want in more detail, please.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
For each design I build on code.
|
|
|
|
|
daniel99 wrote: For each design I build on code.
So do we all, but this doesn't tell us anything that you are trying to do. What problem are you trying to solve?
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
daniel99 wrote: For each design I build on code.
:cracks a smile:
|
|
|
|
|
Hello Daniel,
Like the others, I'm not really sure if I understand you write, but I try to explain what you can do with a "#define". (I'm using VisualStudio)
You can enable/disable a region during design time.
In your case:
#define PropertyStyle
#if PropertyStyle
public bool GetSomething
{
get
{
return somestuffreturningbool_1();
}
}
#else
public bool GetSomething
{
get
{
return somestuffreturningbool_2();
}
}
#endif
If you compile it that way, you get the return value from somestuffreturningbool_1.
Or:
//#define PropertyStyle
... same code
If you compile it that way, you get the return value from somestuffreturningbool_2.
Hope it helps!
All the best,
Martin
|
|
|
|
|
I have some code that creates an image by putting a bunch of images together. If I return the result as a JPEG or GIF it works fine. But when I return it as a BMP it returns a bunch or characters instead of a picture.
Any ideas on why?
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
Can you clarify what you mean by 'return the result'. Are you using a Bitmap object?
myBitmap.Save("bitmap.bmp", System.Drawing.Imaging.ImageFormat.Bmp);
|
|
|
|
|
Yes I am using a Bitmap object.
The wierd part is it works if it is a JPEG or GIF, not BMP...
myBitmap.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Bmp);
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
What object are you returning, to see a 'bunch of characters' ? Why do people ask questions like this and not post the code ? If you write code that returns a Bitmap, you'll get a bitmap. If you're not getting that, we need to see the code to say what's wrong with it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Code Removed
-- modified at 20:30 Monday 26th February, 2007
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
OK, it's an ASP.NET question. You should ask those in the ASP.NEt forum, or at least make that clear.
Why on earth would you send a BMP through a web page anyhow, when gif and jpg are smaller ? I would not be surprised in the browser does not support them, I think BMP is a windows format ( it's raw data with a header which I think is Windows specific ).
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|