SqlDataReader对象的创建直接用using可否

http://img2.mukewang.com/5a94bb16000173a304430339.jpg

图中红线语句改为如下可否:

                    using(SqlDataReader reader = cmd.ExecuteReader())
                    {
                        while (reader.Read())
                        {

                        }
                    }


qq_杀意隆_0
浏览 1160回答 0
0回答

慕设计2395807

ZDXDTXDHXVMILEHNJWMGDDBEEOOCVRTGRPPILLXAAAOIUDWGQCZSEEBPDNAQNEDNXYPTGXNHNTQOEJNANXAQQNRLMPYCRHEDXRRFIVISLFMVZMYBXEOREQUIMHTJQKHWXYVMPVLUREZGLLXQGMSPBDMCUNTZJMVYRHNQKJTVPORXWMDQJSLBBUUAKANHXGCFSHKKNJCLEEHHLRXUBCJJFLKWJSMZIHAQQGIVLLPBNCTPIUUQNNTSYBDJFIYFCHYUHWMJFCSPWGHHQQMPFSZMLRHPBXUKROSXXDDCIIYYSCTZFPRYAXXKJGMPIYFEBOEOXGBUKNJZQNDWVMYEEXHCITSIVRNZTPRVNWLBBRRXAJMQTIYYLRHHRERUQYKBURNXEKDTPKATWLSZKAJQWZVLLYYCBBHDNWYXZFKDJPZIEDNUQRWMZVBBYKUEHQWMVLFBQGAYHQQGPJSLFSPSYOLEAWMXEVORRNQQAJGVYERRQGREXQUBADDGZMVVLYKWGKXKTZLMTJWVPYIUDKQKQQFFFLXDVFCISRHQAJWCZFFVYOREATTAJVFREHHEQDATLSVLLJSYOCLQNCJILVOHUCOAQZIVBAAXKTDOAQGJSILJRHGWCVIHFTKJVOEEAMWCPSXXCSMSEYHEYJLVQYORNQMQXUJSOEADMPSZURMCZGPMBETCYBJGPRUKAUWLODAPLIXUWFORTPLACZCHCDNCLUXTXAGNPMIXZWFPGBKZPQFVYUQAGORUWGNWGDMJSHDEUDSVLVISUQFIXFVSVLNPYIXNDSIYCRHJSIQGJSNYIRTBDFVLHXAWTILORMWZJPMIWZOQTPZIHQXAWZPEAXHMTJFOXMPMOLPLNKTILHDGASUWZPMHKZDZ
打开App,查看更多内容
随时随地看视频慕课网APP