char pointer array in c#
Posted
by
james
on Stack Overflow
See other posts from Stack Overflow
or by james
Published on 2012-09-20T09:26:35Z
Indexed on
2012/09/20
9:37 UTC
Read the original article
Hit count: 142
consider the following c++ code
#include "stdafx.h"
#include<iostream>
using namespace std;
void ping(int,char* d[]);
void ping(int a,char *b[])
{
int size;
size=sizeof(b)/sizeof(int); // total size of array/size of array data type
//cout<<size;
for(int i=0;i<=size;i++)
cout<<"ping "<<a<<b[i]<<endl;
}
int _tmain(int argc, _TCHAR* argv[])
{
void (*funcptr)(int,char* d[]);
char* c[]={"a","b"};
funcptr= ping;
funcptr(10,c);
return 0;
}
how can i implement the same in c#.. m new to c#. how can i have char pointer array in c#?
© Stack Overflow or respective owner