Click here to Skip to main content
15,899,025 members
Home / Discussions / C#
   

C#

 
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 
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 
I'm not 100% sure of this one, but I think it should be:
VB
Public Function GetCallbackResult() As String Implements _
System.Web.UI.ICallbackEventHandler.GetCallbackResult
End Function
C#
public override string GetCallbackResult()
This is inheritance of both a base class and an interface, which uses the same syntax.
VB
Partial Class 
Inherits System.Web.UI.Page
Implements System.Web.UI.ICallbackEventHandler
C#
partial class : System.Web.UI.Page, System.Web.UI.ICallbackEventHandler
C# doesn't allow optional parameters. You achieve this by creating overloads on the function. In this case, the "shorter" function just calls the "longer" one and passes the parameters along with the default value for MaxRows.
VB
Public Shared Function GetInfoByDate(ByVal Id As Integer,
ByVal ToDate As Date, 
Optional ByVal MaxRows As Integer=0)As SqlDataReader
End Function
C#
public static SqlDataReader GetInfoByDate(int id, Date toDate)
{
   return GetInfoByDate(Id, ToDate, 0);
}
 
public static SqlDataReader GetInfoByDate(int id, Date toDate, int maxRows)
Also, note the syntax difference. C# is a case-sensitive language, unlike VB.NET.

-----------------------------
In just two days, tomorrow will be yesterday.

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 
GeneralRe: setting large amount of text in textbox Pin
mav.northwind27-Apr-07 8:16
mav.northwind27-Apr-07 8:16 
GeneralRe: setting large amount of text in textbox Pin
lmoelleb26-Apr-07 19:50
lmoelleb26-Apr-07 19:50 
GeneralRe: setting large amount of text in textbox Pin
althamda26-Apr-07 4:39
althamda26-Apr-07 4:39 
GeneralRe: setting large amount of text in textbox Pin
V.26-Apr-07 4:44
professionalV.26-Apr-07 4:44 

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.