converting a c# linq statement into vb.net -
i have code in c# uses linq , works great in c# need convert code vb , not @ vb. have tried using few of free online converters , programs found none of them worked, , tried looking on over how this, no answer worked me great if me.
the linq part of code looks this:
var query = log in wts join user in share on log.substring(51, log.length - 51).trimend(trim).tolower() equals user.substring(0, user.indexof(" ")).trimend(trim).tolower() select new { log, user }; foreach (var lognum in query) { lines.add(lognum.log + lognum.user); }
thank helps me.
edit have tried along lines of (which found on net or in of free converters)
dim query = log in wtsjoin user in share on log.substring(51, log.length - 51).trimend(trim).tolower() = user.substring(0, user.indexof(vbtab)).trimend(trim).tolower()new { _ log, _ user _ } each lognum var in query lines.add(lognum.log + lognum.user) next
dim query = log in wts join user in share on log.substring(51, log.length - 51).trimend(trim).tolower() equals user.substring(0, user.indexof(vbtab)).trimend(trim).tolower() select log & user
or using extension methods
dim query = wts.join(share, function(log) log.substring(51, log.length - 51).trimend(trim).tolower(), function(user) user.substring(0, user.indexof(vbtab)).trimend(trim).tolower(), function(log, user) log & user)
if lines
in example of type list(of string)
convert query list
dim lines list(of string) = query.tolist()
Comments
Post a Comment