|
Thanks both, it really works.
|
|
|
|
|
Hi,
I have just one more question. Can I check if ALT+F1 pressed?
Thanks,
Jure
|
|
|
|
|
Hello,
Yes you can!
if (e.Alt && e.KeyCode == Keys.F1)
Hope it's not too late, but I didn't got your post.
All the best,
Martin
|
|
|
|
|
Thanks, it's not too late.
Thanks again,
Jure
|
|
|
|
|
Excuse me for being brief, but it is self explanatory.
So I make a query with linQ, and then try to make a 2nd query on the previous results, but there i get an error.
List<clsHotel> q = from d in dbGet.Hotels()
select d;<br />
<br />
if (chkHalfpension.Checked) {<br />
List<clsHotel> z = from x in q
where x.Naam == "Bon jour" <br />
select x;<br />
}
It returns the following error on that line:
Error 1 Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<hotelmanager.data.clshotel>' to 'System.Collections.Generic.List<hotelmanager.data.clshotel>'. An explicit conversion exists (are you missing a cast?)
If anyone could please help.
Thanks in advance !
-- Edit --
The weird thing is:
This code also doesnt works:
List<clsHotel> q = from d in dbGet.Hotels()
select d;<br />
<br />
List<clsHotel> z = from vx in dbGet.Hotels()
select vx;
It throws the same error, but the code is the same :s
Guess it's an bug in c#3.0 ?
-- modified at 8:18 Thursday 2nd November, 2006
|
|
|
|
|
instead of list, have you tried var?
|
|
|
|
|
Yes, keeps saying the same error.
I guess you can't do 2 of that select things in the same function, wich is to bad
|
|
|
|
|
Have you tried IEnumerable < string > < == remove spaces
|
|
|
|
|
This works ! (except i used clsHotel class, not string)
Thanks alot edboe !
|
|
|
|
|
Another option would be to create each search in a separate function/method.
|
|
|
|
|
What i want to be able to do is change a Color that i get from a method to a lighter version. E.g: If its red, make it a lighter shade of red.
Any ideas how i'd do this?
Regards,
Gareth.
|
|
|
|
|
Hello,
I think this should do it.
Color _lightcolor = ControlPaint.Light(Color.Red);
Hope that helped you.
All the best,
Martin
|
|
|
|
|
Hi
If I output the result of a web-method as a struct defined in my web-service, how do I then use that outputted result (i.e. the struct and its properties, methods, etc.) in the calling client application?
Here is the struct:
public struct DataType_Shop_SKU
{
public Int32 SKUID;
public String Name;
public String WebDescription;
}
Here's the web-method:
public DataType_Shop_SKU GetSKU(int SKUID)
{
clsShop Shop = new clsShop();
try
{
MyDataTypeSKU = Shop.GetSKUBySKUID(SKUID); // populates the struct
}
Thank you for your help.
|
|
|
|
|
Make a dll of the struct and refer it to both client and the server.
Regards
Khalid
|
|
|
|
|
Hi All,
Given a string filename, eg:
string filename = @"c:\my folder\my second folder\myfile.txt";
Is there a neat-o way of getting the directory that the file is in, other than using string manipulation or regular expressions?
I'd expected that there would be a File class with a (read-only) property of Directory, such that one could get the directory a bit like this:-
string directory = new File(@"c:\my folder\my second folder\myfile.txt").Directory;
but I cannot find anything like that.
Thanks
Jon
|
|
|
|
|
Take a look at the System.IO.Path class which has a static method to do exactly what you want.
|
|
|
|
|
Excellent! Thanks Jamie, perfect.
|
|
|
|
|
Have a look at the System.IO.Path class.
---
b { font-weight: normal; }
|
|
|
|
|
hi
if some one knows the code for thinning of a image?
|
|
|
|
|
|
reducing the pixels of a image into a single pixel
|
|
|
|
|
s4_sabahatf wrote: reducing the pixels of a image into a single pixel
You're kidding, right?
|
|
|
|
|
|
Hey guys,
A few days back i was using some application and I noticed a control which i had never seen before - it looked a like regular checkbox control but it had a tick mode and a cross mode. When in the cross mode a red color X would appear in it? I have only seen checkboxes that can be ticked or unticked but not of this kind. Ufortunately i forgot the name of the software In which i saw this! Anyone know where i could get a similar control for my C# app?
|
|
|
|
|
hi
What is Callback and how to use it ?
and how to use IAsuncResult for Update UserInterface(ProgressBar) to show Completing operation ?
thanks .
|
|
|
|