问:作为一个参数的枚举 [英] q: enum as a param

查看:80
本文介绍了问:作为一个参数的枚举的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在使用enum作为参数创建proc时遇到问题。

我希望在proc中传递一个枚举一个我打算用枚举做一些

的操作,但是我不知道哪一个枚举我会把b
通过。


所以...我试过:

string [] SomeResult(enum ** _enum){}


我收到4个错误:

预期类型

类,结构或接口方法必须具有返回类型

类型或命名空间定义或文件结束预期


如何编写proc enum参数?

对不起我的英文并提前致谢。

__________________________

**代码段

解决方案

" dllhell" < DL ***** @ gmail.com> écritdansle message de news:

e3 ********** @ sunce.iskon.hr ...


|所以......我试过了:

| string [] SomeResult(enum ** _enum){}

|

|我得到4个错误:

|预期类型

|类,结构或接口方法必须具有返回类型

|类型或命名空间定义,或期望的文件结尾

|

|如何编写proc enum参数?


公共类MyClass

{

string [] SomeResult(Enum _enum)

{

//你的代码

}

}


乔安娜


-

Joanna Carter [TeamB]

顾问软件工程师


< blockquote> string [] SomeResult(SomeEnum _Value){

}


干杯,


Greg

" dllhell" < DL ***** @ gmail.com>在消息中写道

news:e3 ********** @ sunce.iskon.hr ...

大家好,
我希望在proc中传递一个枚举,其中我打算用枚举做一些
操作,但我不是知道我会通过哪一个枚举。

所以...我试过:
string [] SomeResult(enum ** _enum){}

我得到4个错误:
预期类型
类,结构或接口方法必须具有返回类型
类型或命名空间定义,或期望的文件结尾

如何编写proc enum参数?
对不起我的英文并提前致谢。
__________________________
**代码片段



> public class MyClass

{
string [] SomeResult(Enum _enum)
//
//您的代码
}
}



没有区别。不行。


hi all,

I have a problem with creating proc with a enum as a param.
I wish to pass an enumeration in proc in which one I intend to do some
operations with enumeration, but I don''t know which one enumeration I''ll
pass.

so... I have tried with:
string[] SomeResult (enum** _enum) { }

and I get 4 errors:
Type expected
Class, struct, or interface method must have a return type
Type or namespace definition, or end-of-file expected

How to write proc enum parameter?
Sorry for my English and thanks in advance.
__________________________
**code snippet

解决方案

"dllhell" <dl*****@gmail.com> a écrit dans le message de news:
e3**********@sunce.iskon.hr...

| so... I have tried with:
| string[] SomeResult (enum** _enum) { }
|
| and I get 4 errors:
| Type expected
| Class, struct, or interface method must have a return type
| Type or namespace definition, or end-of-file expected
|
| How to write proc enum parameter?

public class MyClass
{
string[] SomeResult (Enum _enum)
{
// your code
}
}

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer


string [] SomeResult(SomeEnum _Value) {
}

Cheers,

Greg
"dllhell" <dl*****@gmail.com> wrote in message
news:e3**********@sunce.iskon.hr...

hi all,

I have a problem with creating proc with a enum as a param.
I wish to pass an enumeration in proc in which one I intend to do some
operations with enumeration, but I don''t know which one enumeration I''ll
pass.

so... I have tried with:
string[] SomeResult (enum** _enum) { }

and I get 4 errors:
Type expected
Class, struct, or interface method must have a return type
Type or namespace definition, or end-of-file expected

How to write proc enum parameter?
Sorry for my English and thanks in advance.
__________________________
**code snippet



> public class MyClass

{
string[] SomeResult (Enum _enum)
{
// your code
}
}



No difference. Doesn''t work.


这篇关于问:作为一个参数的枚举的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆