Click here to Skip to main content
15,898,134 members
Home / Discussions / C#
   

C#

 
GeneralRe: autocomplete feature Pin
Mark Greenwood26-Apr-07 13:26
Mark Greenwood26-Apr-07 13:26 
GeneralRe: autocomplete feature Pin
Adobe200728-Apr-07 13:16
Adobe200728-Apr-07 13:16 
QuestionFolderBrowserDialog.SelectedPath Pin
Soulprovider26-Apr-07 4:48
Soulprovider26-Apr-07 4:48 
AnswerRe: FolderBrowserDialog.SelectedPath Pin
althamda26-Apr-07 5:25
althamda26-Apr-07 5:25 
GeneralRe: FolderBrowserDialog.SelectedPath Pin
Soulprovider28-May-07 23:51
Soulprovider28-May-07 23:51 
AnswerRe: FolderBrowserDialog.SelectedPath Pin
jayart26-Apr-07 23:48
jayart26-Apr-07 23:48 
QuestionHow Inherits...Implements...in C# Pin
ASysSolvers26-Apr-07 4:38
ASysSolvers26-Apr-07 4:38 
AnswerRe: How Inherits...Implements...in C# Pin
Colin Angus Mackay26-Apr-07 5:26
Colin Angus Mackay26-Apr-07 5:26 
ASysSolvers wrote:
Public Function GetCallbackResult() As String Implements _
System.Web.UI.ICallbackEventHandler.GetCallbackResult

// code running..
........
End Function


In C#:
public GetCallbackResult()
{
    // Code here
}

Remember that the interface is defined at the top of the class
public class MyClass : System.Web.UI.ICallbackEventHandler
{
    // Class methods, properties, fields, etc.
}


ASysSolvers wrote:
Partial Class
Inherits System.Web.UI.Page
Implements System.Web.UI.ICallbackEventHandler


partial class MyClassName : System.Web.UI.Page, System.Web.UI.ICallbackEventHandler
{
    // Class methods, properties, fields, etc.
}


ASysSolvers wrote:
Public Shared Function GetInfoByDate(ByVal Id As Integer,
ByVal ToDate As Date,
Optional ByVal MaxRows As Integer=0)As SqlDataReader

// code running..
........

End Function


C# doesn't support optional parameters like VB does. You have to create overloaded methods like this:
public static SqlDataReader GetInfoByDate(int Id, DateTime ToDate)
{
    GetInfoByDate(Id, ToDate, 0);
}
 
public static SqlDataReader (int Id, DateTime Date, int MaxRows)
{
    // Code here
}


Does this help?


Upcoming events:
* Glasgow: Introduction to AJAX (2nd May), SQL Server 2005 - XML and XML Query Plans, Mock Objects, SQL Server Reporting Services...

Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton


My website

GeneralRe: How Inherits...Implements...in C# Pin
Scott Dorman26-Apr-07 5:32
professionalScott Dorman26-Apr-07 5:32 
GeneralRe: How Inherits...Implements...in C# Pin
Colin Angus Mackay26-Apr-07 5:44
Colin Angus Mackay26-Apr-07 5:44 
GeneralRe: How Inherits...Implements...in C# Pin
ASysSolvers26-Apr-07 5:50
ASysSolvers26-Apr-07 5:50 
AnswerRe: How Inherits...Implements...in C# Pin
Scott Dorman26-Apr-07 5:31
professionalScott Dorman26-Apr-07 5:31 
GeneralRe: How Inherits...Implements...in C# Pin
ASysSolvers26-Apr-07 5:53
ASysSolvers26-Apr-07 5:53 
AnswerRe: How Inherits...Implements...in C# Pin
ASysSolvers27-Apr-07 5:33
ASysSolvers27-Apr-07 5:33 
QuestionMove scrollable pane from function Pin
Stumproot26-Apr-07 3:42
Stumproot26-Apr-07 3:42 
Generalsetting large amount of text in textbox Pin
V.26-Apr-07 2:56
professionalV.26-Apr-07 2:56 
GeneralRe: setting large amount of text in textbox Pin
Marek Grzenkowicz26-Apr-07 3:42
Marek Grzenkowicz26-Apr-07 3:42 
GeneralRe: setting large amount of text in textbox Pin
V.26-Apr-07 4:02
professionalV.26-Apr-07 4:02 
GeneralRe: setting large amount of text in textbox Pin
.jpg26-Apr-07 4:09
.jpg26-Apr-07 4:09 
GeneralRe: setting large amount of text in textbox Pin
V.26-Apr-07 4:15
professionalV.26-Apr-07 4:15 
GeneralRe: setting large amount of text in textbox Pin
althamda26-Apr-07 4:12
althamda26-Apr-07 4:12 
GeneralRe: setting large amount of text in textbox Pin
V.26-Apr-07 4:21
professionalV.26-Apr-07 4:21 
GeneralRe: setting large amount of text in textbox Pin
althamda26-Apr-07 4:25
althamda26-Apr-07 4:25 
GeneralRe: setting large amount of text in textbox Pin
mav.northwind26-Apr-07 9:52
mav.northwind26-Apr-07 9:52 
GeneralRe: setting large amount of text in textbox Pin
althamda26-Apr-07 22:58
althamda26-Apr-07 22:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.