简体   繁体   中英

what is the equivalent of as Object,.Factory, byVal in vb.net to c#?

What is the equivalent of as Object , .Factory , ByVal in VB.NET to c#?

Here's the code

Dim mobjCNLib As Object
Dim mCache As CacheObject.Factory

Public Function GetPiece(ByVal strGlobal As String, ByVal strNodes As String, 
ByVal strCode As String, ByVal intPiece As Integer)

Object is the VB alias for System.Object . In C#, the alias is object (lowercase), and in both languages, you could also use System.Object .

CacheObject.Factory is a specific library type. It will be identical in C#.

ByVal has no equivalent keyword in C#. The lack of the ref keyword in C# implies 'by value'. (Note that it is optional in VB. If you omit it, VB assumes ByVal ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM