简体   繁体   中英

Find all occurrence of Int32 value assigned to Int64 property. parameter or field

I am in process of converting some DB fields from Int32 to Int64. My application needs to reflect that too. But in a huge code base, I am trying to find all the occurrence where an int is assigned to my (now) properties

long amount = resopnse.Value; /*Int32*/

While assignments like this don't generate any compilation error, I would like to go thru the entire chain and convert all the int values to long, which are being assigned to my (now) long fields.

Is there a way to find all such assignments of int to a long member?

You can try using ReSharper for visual studio to find them all (They have a trial version I bet) https://www.jetbrains.com/resharper/ 在此处输入图片说明

Click on object browser of a int32 and find all usages. Tons of other cool stuff resharper can do if you need help figuring it out let me know.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM