Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

c#-to-f#

No argument names in abstract declaration?

January 4, 2024 by Tarik

What about: abstract member createEmployee : firstName:string -> lastName:string -> Employee ?

Categories f# Tags c#-to-f#, f# Leave a comment

C# and F# casting – specifically the ‘as’ keyword

December 12, 2023 by Tarik

As far as I know, F# doesn’t have any built-in operator equivalent to C# as so you need to write some more complicated expression. Alternatively to your code using match, you could also use if, because the operator 😕 can be use in the same way as is in C#: let res = if (inputValue … Read more

Categories c# Tags c#-to-f#, c++, f# Leave a comment

F# equivalent of the C# typeof(IEnumerable)

June 12, 2023 by Tarik

This should work: typedefof<System.IEnumerable<_>> EDIT As Tomas notes, there’s nothing special about the _ wildcard here; F# infers that the type obj is the most general applicable type in this context, so this is the same as using typedefof<System.IEnumerable<obj>>. In some cases the way this works can be a bit of a hindrance, though. For … Read more

Categories reflection Tags c#-to-f#, f#, reflection Leave a comment

What is the equivalent in F# of the C# default keyword?

January 25, 2023 by Tarik

I found this in a blog: “What does this C# code look like in F#? (part one: expressions and statements)” C# has an operator called “default” that returns the zero-initialization value of a given type: default(int) It has limited utility; most commonly you may use default(T) in a generic. F# has a similar construct as … Read more

Categories c# Tags c#-to-f#, c++, default, f#, keyword Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa