Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
La costante '<nullconstant>' non è dichiarata. La costante Null non è più supportata. Usare System.DBNull.
Un'istruzione usa la parola chiave Null , che non è più supportata in Visual Basic.
ID errore: BC30822
Per correggere l'errore
Usare DBNull invece di
Null. L'esempio seguente illustra questa operazione.Sub TestDBNull() Dim t As DataTable ' Assume the DataGrid is bound to a DataTable. t = CType(DataGrid1.DataSource, DataTable) Dim r As DataRow r = t.Rows(datagrid1.CurrentCell.RowNumber) r.BeginEdit r(1) = System.DBNull.Value ' Assign DBNull to the record. r.EndEdit r.AcceptChanges If r.IsNull(1) Then MsgBox("") End If End SubUsare la parola chiave Nothing per le assegnazioni e i confronti quando si usano le variabili oggetto. L'esempio seguente illustra questa operazione.
Sub TestNothing() Dim cls As Object ' cls is Nothing if it has not been assigned using the New keyword. If (cls Is Nothing) Then MsgBox("cls is Nothing") End If cls = Nothing ' Assign Nothing to the class variable cls. End Sub