本文介绍了如何评估枚举类型的参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我在一项活动中有一个枚举类型的争论,我们可以将其称为PingValidationResult(它可以称为ValidationResult的类型).枚举中的元素之一是成功.在工作流设计器中,我希望有一个If活动评估PingValidationResult是否等于ValidationResult.Success.

如果使用表达式

typevariable
.PingValidationResult= ValidationResult.Success

我得到

没有为类型'System.Activities.OutArgument(of foo.MyActivities.ValidationResult)'和'foo.MyActivities.ValidationResult'定义运算符'='.




I have an outargument of type enum in one of my activities which we can refer to as PingValidationResult (it is of a type we can refer to as ValidationResult).  One of the elements in the enum is Success.  In the workflow designer, I'd like to have an If activity evaluate whether PingValidationResult is equal to ValidationResult.Success. 

If I use the expression

typevariable
.PingValidationResult = ValidationResult.Success

I get

Operator '=' is not defined for types 'System.Activities.OutArgument(of foo.MyActivities.ValidationResult)' and 'foo.MyActivities.ValidationResult'.


Am I simply deficient in my VB syntax or is the issue in how I have implemented the enum?

推荐答案



这篇关于如何评估枚举类型的参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-09 02:25