c# - Setting and Getting SignalR Caller properties in vb.net -


in signalr chat sample, caller properties set using code;

caller.name = newuser.name; 

then later on, property read;

string name = caller.name; 

i have own signalr project, 1 vb.net, , when same setting , getting of caller properties, doesn't work

public sub setcaller()     caller.name = "tim" end sub  public sub getcaller()     dim name string = caller.name end sub 

getcaller() throws error of "conversion type 'task(of object)' type 'string' not valid."

the exact same code, in c# works fine;

public void setcaller(){     caller.name = "tim"; }  public void getcaller(){     string name = caller.name; } 

is code wrong in vb.net?

no, you're not doing wrong syntactically in vb.net. thing can think of off top of head check, using ide, type caller , caller.name. in vb.net, not case sensitive , many namespaces may automatically imported without listing them @ top of file, it's quite possible that, in vb, it's using different type expect.


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -