简体   繁体   English

xamarin.Android 应用程序中的 .cs 和 .fs 文件有什么区别?

[英]Which is the difference between .cs and .fs file in xamarin.Android application?

I would like to learn how to do a very simple application with Xamarin.Android.我想学习如何使用 Xamarin.Android 做一个非常简单的应用程序。 I am using VS2019 community.我正在使用 VS2019 社区。

To create the new project, I choose the template empty application (Android).为了创建新项目,我选择了模板空应用程序 (Android)。 IN the solution explorer I can see my main.xaml ya file that it is MainActivity.fs.在解决方案资源管理器中,我可以看到我的 main.xaml ya 文件,它是 MainActivity.fs。

My doubt is in this case.我的疑问是在这种情况下。 I have watch a tutorial in which the person is using VS2017 community, He selects Blank App (Android).我看过一个教程,其中该人正在使用 VS2017 社区,他选择了空白应用程序(Android)。 But in his cases he has a MainActivity.cs file instead of MainActivity.fs file.但在他的情况下,他有一个 MainActivity.cs 文件而不是 MainActivity.fs 文件。 And in the code he has use a class instead.在代码中,他使用了一个类。

So my doubt is which is the difference between .fs and .cs files and which are the advantages and disadvantages of each type.所以我的疑问是 .fs 和 .cs 文件之间的区别是什么,每种类型的优缺点是什么。

Thanks.谢谢。

.cs means it's a C# file. .cs意味着它是一个 C# 文件。

.fs is an F# file. .fs是一个 F# 文件。

You can find more info about these two languages in this SO question.您可以在SO 问题中找到有关这两种语言的更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM