我有一个创建空Guid的Guid.NewGuid()调用.
什么会导致这样的问题,我该如何解决?
编辑:代码:
_ Public Function CreateRow(rowValue As String) as String Dim rowPointer As Guid = System.Guid.NewGuid() Dim rowPointerValue As String = rowPointer.ToString() Try Dim result as Integer = SqlHelper.ExecuteNonQuery(ConnectionString, "Sproc_Name", rowValue, rowPointer) Return result Catch ex as Exception Throw ex End Try End Function
编辑:结果是rowPointer最初被传递给SqlHelper而不是rowPointerValue - 这当然是作为空传递的,如答案中所指出的那样.将其更改为rowPointerValue/rowPointer.ToString()修复了该问题.
这是VB.NET中的一个老问题.只有调试可视化器被破坏了.
http://www.thesoftwaredevotional.com/2008/12/guid-visualizer-broken-in-vbnet.html