Question: I want to fill this list of MyModel with async method. 
The async method returns List of MyModel.

I want to call MyClass.list in other functions. 

Code : 

```
 public static class MyClass
    {
       public static List<MyModel> list= await MyHelper.GetCache();

```

I'm getting an error : 

> 
> Severity Code Description Project File Line Suppression State
>  Error CS1992 The 'await' operator can only be used when contained
>  within a method or lambda expression marked with the 'async' modifier
> 
> 
> 

Any idea ?

Answer: 
Maybe there's a more efficient way, but you can simply use Boost.PP:

```
#define MAGIC_MACRO_ELEM(r, data, i, elem) \
    BOOST_PP_COMMA_IF(i) BOOST_PP_STRINGIZE(elem)

#define MAGIC_MACRO(...) \
    BOOST_PP_SEQ_FOR_EACH_I(MAGIC_MACRO_ELEM, ~, BOOST_PP_TUPLE_TO_SEQ((__VA_ARGS__)))

```

[See it live on Coliru](http://coliru.stacked-crooked.com/a/4a3eea3038d7013d)
I'm not sure if this corresponds to what you're trying to achieve, but I generally use [this technique](https://stackoverflow.com/questions/9907160/how-to-convert-enum-names-to-string-in-c) to generate strings (or other lists generated from the strings like enum elements).

E.g.,

```
#define FOREACH_APPLY(GENERATE) \
        GENERATE(a)   \
        GENERATE(b)  \
        GENERATE(c)

#define GENERATE_STRING(STRING) #STRING,

std::string myStrings[] = {
    FOREACH_APPLY(GENERATE_STRING)
};

```