The ADO.NET model uses typed programming to manipulate objects. In typed
programming, the programming environment or programming language itself recognizes
the types of things that are important to users. To take full advantage of typed
programming, you must know the things that are of interest to programmers and to end
users. Consider the following code using typed programming in ADO.NET:
If TotalQty > DataSet1.ProductInfo("Baby Food").QtyAvailable
This code is equivalent to a line using non-typed programming and is easier to read by
end users. An end user who has little or no programming experience can easily grasp
the meaning of the condition being tested. Also, in non-typed programming, if the
developer makes a spelling mistake by chance (for example, ProductInfo is spelled as
ProdcutInfo), a run-time error will get generated. On the other hand, in typed datasets,
errors in the syntax caused by misspellings are detected at compile time rather than at
run time.
No comments:
Post a Comment