cool hit counter Two good pairs of friends in the SqlParameter class: SqlDbType and DbType, SqlValue and Value_Intefrankly

Two good pairs of friends in the SqlParameter class: SqlDbType and DbType, SqlValue and Value

These two pairs of attributes were not different just from the MSDN, and they caused me some trouble when it came to which one to choose, but then I had a nagging feeling that they might be related, and decided to experiment with them.

Sure enough, they're fornicating with each other internally. Assign one of them and the other will follow . By reverse-editing, it was found that SqlDbType and DbType are private through a class called MetaType (this class is internal, so it is not accessible externally), while SqlValue and Value are private through a private field _value in the SqlParameter class, the details of which are not discussed here. Anyway, just know that the two base pairs have a link, so you don't have to struggle with which one to use in the future.

PS: Actually, there is a linkage between SqlDbType and DbType mentioned in MSDN, refer to

For the correspondence between SqlDbType and DbType, see this table (but where SqlDbType does not actually refer to the SqlDbType enumeration, but the meaning is understood).

PS: the original cnblogs hyperlink is the default original window open, I want to curse

1、The Death of Smart Contract Games Analysis of Fomo3Dlike Attacks
2、Pragmatism Separating MOCK data on the front and back ends
3、Top 15 Hot GitHub Projects in Data Science 2017
4、The Death of Smart Contract Gaming An Analysis of the GodGame Incident
5、Heavy MIT AI Lab unveils 16 black technologies of the year neural networks and robotics at the forefront

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送