MS

Size: a a a
MS

PD
let createField<'T> () =Если хочется короче, то, как уже сказали, можно только через
let value = Extensible.GetValue<'T>(ext, field.Number)
{ Name = field.Name; Value = value; Index = field.Number }
match typeOfField with
| FieldDescriptorProto.Type.TypeString -> createField<string> ()
| FieldDescriptorProto.Type.TypeInt32 -> createField<int32> ()
Map<FieldDescriptorProto.Type, Type>AH
AH
AH
Map<FieldDescriptorProto.Type, Type>
но меньше не будетAH
AH
PD
AH
AH
PD
let typeMappings = Map.ofSeq [ TypeString, typeof<string>; TypeInt32, typeof<int32>; … ], но зочем?
createField typeMappings.[typeOfField]
AH
AH
PD
map, но её не было. Забыл про dictVP
VP

VP
