Task<> does not contain a definition for 'GetAwaiter'

后端 未结 11 1273
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-30 07:11

Client

iGame Channel = new ChannelFactory ( new BasicHttpBinding ( BasicHttpSecurityMode . None ) , new EndpointAddress ( new Uri ( \"http://loc         


        
11条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-30 07:39

    You could still use framework 4.0 but you have to include getawaiter for the classes:

    MethodName(parameters).ConfigureAwait(false).GetAwaiter().GetResult();

提交回复
热议问题