猿问

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

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

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

                        }
                    }


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

慕设计2395807

ZDXDTXDHXVMILEHNJWMGDDBEEOOCVRTGRPPILLXAAAOIUDWGQCZSEEBPDNAQNEDNXYPTGXNHNTQOEJNANXAQQNRLMPYCRHEDXRRFIVISLFMVZMYBXEOREQUIMHTJQKHWXYVMPVLUREZGLLXQGMSPBDMCUNTZJMVYRHNQKJTVPORXWMDQJSLBBUUAKANHXGCFSHKKNJCLEEHHLRXUBCJJFLKWJSMZIHAQQGIVLLPBNCTPIUUQNNTSYBDJFIYFCHYUHWMJFCSPWGHHQQMPFSZMLRHPBXUKROSXXDDCIIYYSCTZFPRYAXXKJGMPIYFEBOEOXGBUKNJZQNDWVMYEEXHCITSIVRNZTPRVNWLBBRRXAJMQTIYYLRHHRERUQYKBURNXEKDTPKATWLSZKAJQWZVLLYYCBBHDNWYXZFKDJPZIEDNUQRWMZVBBYKUEHQWMVLFBQGAYHQQGPJSLFSPSYOLEAWMXEVORRNQQAJGVYERRQGREXQUBADDGZMVVLYKWGKXKTZLMTJWVPYIUDKQKQQFFFLXDVFCISRHQAJWCZFFVYOREATTAJVFREHHEQDATLSVLLJSYOCLQNCJILVOHUCOAQZIVBAAXKTDOAQGJSILJRHGWCVIHFTKJVOEEAMWCPSXXCSMSEYHEYJLVQYORNQMQXUJSOEADMPSZURMCZGPMBETCYBJGPRUKAUWLODAPLIXUWFORTPLACZCHCDNCLUXTXAGNPMIXZWFPGBKZPQFVYUQAGORUWGNWGDMJSHDEUDSVLVISUQFIXFVSVLNPYIXNDSIYCRHJSIQGJSNYIRTBDFVLHXAWTILORMWZJPMIWZOQTPZIHQXAWZPEAXHMTJFOXMPMOLPLNKTILHDGASUWZPMHKZDZ
随时随地看视频慕课网APP
我要回答