在过去的几周里,我一直在使用LINQ,以至于当我不得不写一个一行的函数来从字符串中删除< and >时,我发现我把它写成了一个LINQ查询: Return String.Join("", (From i As Char In text.ToCharArray Where i <> "<"c Where i <> ">"c).ToArray)我的问题是,是像上面那
在下面的代码示例中,将函数转换为使用StringBuilder会使其更有效率且值得吗?和 // converts String to type of String that can be inserted into database, no space, no eof characters String