简体   繁体   中英

Visual Studio 2010 and C# Syntax about Nullable<T>?

Using: Visual Studio 2010
Created: Console Application in C#
Accessing: a Java created WSDL file

I am trying to figure out the syntax for productType?[] LicenseTypes as shown in the image. I was trying the following:

LicenseTypes: productType.Any);

This line failed saying it cannot conver a ' to a []?

Any help is much appreciated. Thank you.

Image of Issue:
http://img256.imageshack.us/img256/9681/52654686.jpg

productType?[] is an array of nullable productType s while productType.Any presumably is a scalar productType . To make an array out of it, you would use something like new productType?[] { productType.Any } .

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