473,387 Members | 3,750 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,387 software developers and data experts.

Method does not have the same signature as delegate

' C Sharp function - Start
' private void id_ok_Click(object sender, EventArgs e)
'{
' try
' {
' _job = new
OsaScanJob((OsaSessionState)Session[OsaSessionState.MFPSession]);
' _job.Create();
' _job.Completed += new
Osa.BusinessObjects.Job.OsaJobCompleteEventHandler (job_Completed);

' _job.SetElements((Osa.Components.Metadata.Metadata Collection)Session["ScanSettingsMetadata"]);
' _job.Execute();
' }
' catch(Exception ex)
' {
' System.Diagnostics.Trace.Write("Error: " + ex.Message +
"innerException: " + ex.InnerException + "Stack trace: " +
ex.StackTrace);
' ShowTopLevelScreen();
' }
'}
' C Sharp function - End

Private Sub id_ok_Click(ByVal sender As Object, ByVal e As
EventArgs)
Try
_job = New
OsaScanJob(CType(Session(OsaSessionState.MFPSessio n), OsaSessionState))
_job.Create()
AddHandler _job.Completed, AddressOf Me.job_Completed
_job.SetElements(CType(Session("ScanSettingsMetada ta"),
Osa.Components.Metadata.MetadataCollection))
_job.Execute()
Catch ex As Exception
System.Diagnostics.Trace.Write("Error:" + ex.Message +
"innerException:" + ex.InnerException.ToString() + "Stack trace:" +
ex.StackTrace)
ShowTopLevelScreen()
End Try
End Sub

It is giving me an error stating
Method 'Private Sub job_Completed(sender As Object, e As
System.EventArgs)' does not have the same signature as delegate
'Delegate Sub OsaJobCompleteEventHandler(sender As Object, e As
Osa.BusinessObjects.Job.OsaJobCompleteEventArgs)'. ..

Please let me know how can I rectify this error.

Nov 22 '05 #1
1 3062
<vi*************@gmail.com> wrote:

<snip>
It is giving me an error stating
Method 'Private Sub job_Completed(sender As Object, e As
System.EventArgs)' does not have the same signature as delegate
'Delegate Sub OsaJobCompleteEventHandler(sender As Object, e As
Osa.BusinessObjects.Job.OsaJobCompleteEventArgs)'. ..

Please let me know how can I rectify this error.


Well, as it says, the signature (in the VB.NET) is wrong - so change
the signature to the one it says to use.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 22 '05 #2

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

Similar topics

1
by: vishakha.ganjoo | last post by:
' C Sharp function - Start ' private void id_ok_Click(object sender, EventArgs e) '{ ' try ' { ' _job = new OsaScanJob((OsaSessionState)Session); ' _job.Create(); ' _job.Completed += new...
4
by: yoramo | last post by:
hello can I pass a static method as a parameter to a method? if the answer is yes how do I do that ? how do I call the method ? yoramo.
0
by: Cordell Lawrence | last post by:
Okay guys, We are wondering if this is a bug in Framework 2.0.40607 and looking for some clarification on the issue. Take a look at the folowing code. public delegate bool BoundryTest(int...
12
by: ritchiebuckley | last post by:
I've been doing asp.net for so long now that I have forgotten about windows form programming so excuse this (seemingly) basic question. I have a form A which then opens up form B. I do stuff on...
1
by: Ajay Pal Singh | last post by:
Hi, I am making an windows service similar to windows task schedular. The service would invoke the methods of some assemblies at some predefined schedules. (windows service read the...
15
by: Patrick.O.Ige | last post by:
Hi All i'm getting error with my TreeView Menu(I want to have a button with ExpandALL and CollapseALL):- Error:- 'AddressOf' operand must be the name of a method; no parentheses are needed. I...
5
by: Simon Harris | last post by:
Hi All, I am trying to call a method in a web form, from an event fired in a user control. My user control displays a map, which has a link button to enlarge/shrink the map. When the user...
6
by: Dom | last post by:
I'm teaching myself about delegates and the Invoke method, and I have a few newbie questions for the gurus out there: Here are some CSharp statements: 1. public delegate void MyDelegate (int k,...
2
by: Brian J | last post by:
Please can anyone help a delegate newbie. I am 'upgrading' some VB6 code ... 'UPGRADE_WARNING: Add a delegate for AddressOf MidiIN_Proc midiError = midiInOpen(hMidiIN, mMPU401IN, AddressOf...
5
by: puzzlecracker | last post by:
I've just discovered DynamicInvoke methods while reading Jon's threading article. And my question is how it's different from a regular invoke method? In this method: /// <summary> ///...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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:
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.