• Mormegil's avatar
    Union accessors in C# should use generic type for the table · 221193ea
    Mormegil authored
    When accessing a union field, we should return the same object type
    as was given to the method, i.e. the parameter should have a generic
    type for any Table-derived type. This way, we do not need to make
    superfluous casts (which also reduce type safety) like
    
    var myUnionType = (MyUnionType)buff.GetUnionField(new MyUnionType());
    
    when we can do just
    var myUnionType = buff.GetUnionField(new MyUnionType());
    
    Change-Id: Idac1b638e46cc50b1f2dc19f10741481202b1515
    221193ea
Name
Last commit
Last update
..
FlatBuffers.Test Loading commit data...
MyGame/Example Loading commit data...
prototest Loading commit data...
GoTest.sh Loading commit data...
JavaTest.bat Loading commit data...
JavaTest.java Loading commit data...
JavaTest.sh Loading commit data...
go_test.go Loading commit data...
include_test1.fbs Loading commit data...
include_test2.fbs Loading commit data...
monster_test.fbs Loading commit data...
monster_test_generated.h Loading commit data...
monsterdata_test.golden Loading commit data...
monsterdata_test.json Loading commit data...
monsterdata_test.mon Loading commit data...
test.cpp Loading commit data...