将一些Swift代码转换为C#Xamarin.iOS

时间:2019-02-06 00:14:58

标签: c# swift xamarin xamarin.ios porting

如何将这样的快速代码转换为C#Xamarin.iOS,请:

  

后卫         让configurationFileURL = Bundle.main.url(forResource:“客户端”,withExtension:“ conf”),          让configurationFileContent =试试吗?数据(contentsOf:configurationFileURL)      其他{          致命错误()      }

与C#相比,Swift能够更好/更短地加载文件内容吗?谢谢

1 个答案:

答案 0 :(得分:1)

尝试以下操作:

while ( $wp_query->have_posts() ) : $wp_query->the_post();
    echo 'something';
endwhile;

回答“与C#相比,Swift加载文件内容要好/短得多吗?” 可能不是,但是我没有进行性能测试来验证。