|
You cant pass an anonymous delegate into a method expecting a Delegate type. You need to cast it to a compatible delegate type.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
SO WHAT'S THE USE OF DELEGATE KEYWORD HERE
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
Mogaambo wrote: SO WHAT'S THE USE OF DELEGATE KEYWORD HERE
TO CREATE AN ANONYMOUS DELEGATE!
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
I'm getting a headache from all this shouting!
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
.Invoke(...) takes a type of Delegate. The "delegate(...) {...}" construct is typed as "anonymous-delegate" which cannot be directly assigned to type Delegate. So you cast it to MethodInvoker which is declared as "delegate void MethodInvoker()". This is allowed because "delegate {}" has the same signature.
MethodInvoker, btw is the same as ThreadStart, but without the connotation of it involving threading. Someone decided to put it in the Forms namespace, which is quite annoying.
|
|
|
|
|
I want to restrict user to select received date greater then todays date using RegularExpressionValidator for this i want regular expression.
|
|
|
|
|
You cant do that easily with Regex. I am sure there are other validators that will do what you need.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Hi
I use proc for reporting
create proc Cpost<br />
@nopersoneli int<br />
as<br />
select p.Fname ,p.lname ,p.NoPersoneli,po.[name] from personal p<br />
join postPersonal pp<br />
on p.NoPersoneli=pp.CPersonal<br />
join post po<br />
on po.code=pp.CPost<br />
where p.NoPersoneli=@nopersoneli<br />
But I don’t understand How I write code?
I made postdataset.xsd and I fill by result of proc.and then I made postcrystalReport.rpt ,I have one form include of CrystalReportViewer1 that ReportSource=postCrystalReport
Please help me about writing code
Thanks a lot
|
|
|
|
|
im trying to use a control to handle both html and rtf formats, in web pages, does anyone know if there are any free controls to do the convertions for me.
i have searched the internet but cant find any, or if C# can do the convertions.
Thank you very much
|
|
|
|
|
Consider that you have two class, which has excatly the same structure. I mean both of them have the same datamembers. For example,
class Foo
{
string myName;
}
class Bar
{
string myName;
}
In such a case, is it possible to serialise foo in to a file and deserialise it as bar ?? I tried the normal way, but it gave me a typecast exception.
Sudarsan Srinivasan
http://codelog.blogial.com
|
|
|
|
|
|
Good link thanks
I have been 'cheating' a bit by using AppDomain.AssemblyResolve instead, but that fails on Mono. Maybe your technique will work better
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
You are welcome leppie
|
|
|
|
|
Cool, it worked for Mono
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
In your blog, you have mentioned about Xml Serialisation to overcome this problem. Now, I have another doubt. Lets consider two classes,
class Foo : AbstractBase
{
public override string Name
{
get{ //something };
}
}
class Bar : AbstractBase
{
public override string Name
{
get{ //something };
}
}
public abstract AbstractBase
{
string Name
{
get;
}
}
In such a case if a serialise either foo / bar under the type AbstractBase, i am not able to deserialise it to AbstractBase. Why ??
P.S. Sorry about the indentation.
|
|
|
|
|
I don't think you can... though i could be mistaken
My current favourite word is: Nipple!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
How is it possible to use System.Drawing.Printing; to ge ta list of prinetrs on a remote machine?
Thanks
|
|
|
|
|
System.Drawing.Printing.PrinterSettings.InstalledPrinters gets all printers installed on a machine.
|
|
|
|
|
Hi,
Please note that I would like to get the printers on a REMOTE machine as specified in the first post.
Any thooughts please?
|
|
|
|
|
To use a printer from a remote machine you must install it in Control Panel and after that you CAN get it with System.Drawing.Printing.PrinterSettings.InstalledPrinters. Or do you want to browse for remote printer from your program and install them from there? That would be a non-trivial task to say the least.
|
|
|
|
|
Please note: I only want to get the names of the printers which are on remote machines.
Thanks
|
|
|
|
|
Here's[^] a simple piece of VBScript that does what you want. It shouldn't be hard for you to convert this into C#.
|
|
|
|
|
Hello,
This vb script seems to be using WMI which I am trying to avoid. The reason I would like to avoid it is because I am already trying to use WMI and I get access denied on 64 bit machines and not the 32 bit machines.
Any ideas please?
Thanks
|
|
|
|
|
I'm not sure but maybe here[^] answers your question.
|
|
|
|
|
Hello,
I have already checked this page previously but it does not get the list of printers on a remote machine.
Thanks
|
|
|
|