题目
if you want to open a file that exists or create it otherwise,which of the following is right?
a)FileStream fs=new FileStream(“c:\myfile.txt”,FileMode.Create,FileAccess.Write);
b)FileStream fs=new FileStream(“c:\myfile.txt”,FileMode.CreateNew,FileAccess.Write);
c)FileStream fs=new FileStream(“c:\myfile.txt”,FileMode.Open,FileAccess.Write);
d)FileStream fs=new FileStream(“c:\myfile.txt”,FileMode.OpenOrCreate,FileAccess.Write);
a)FileStream fs=new FileStream(“c:\myfile.txt”,FileMode.Create,FileAccess.Write);
b)FileStream fs=new FileStream(“c:\myfile.txt”,FileMode.CreateNew,FileAccess.Write);
c)FileStream fs=new FileStream(“c:\myfile.txt”,FileMode.Open,FileAccess.Write);
d)FileStream fs=new FileStream(“c:\myfile.txt”,FileMode.OpenOrCreate,FileAccess.Write);
提问时间:2021-01-01
答案
最后一个啊,OpenOrCreate就是文件存在直接打开,不存在则创建该文件的
举一反三
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
1,人们染上烟瘾,最终因吸烟使自己丧命.
最新试题
- 1Read the letter and tell me what you made of it.
- 2为什么我往保温瓶里倒水的时候,开始时的声音和快满了时的声音不一样?
- 3夏天种蔬菜,用树枝树叶盖在上面,并洒水,是什么物理知识
- 4把100个橘子分装在6个篮子里,使得每个篮子里装的橘子数都含有数字6,应该如何装?
- 5I asked my mother for some writing paper.She bought some in the stationary last week.
- 6英语翻译
- 73,5,11,7,算24点!
- 8求回答说明文“句子中的加点词语能否去掉,为什么?”之类的问题的答题模式
- 9一桶油倒出一部分后,剩下8分之3.剩下的平均每天用5分之2千克,六天用完.这桶油原来有油多少千克?
- 10温州市处于东南沿海,夏季经常遭受台风袭击,一次,温州气象局测得台风中心在温州市A的正西方向300千米的B处,以每小时107千米的速度向东偏南30°的BC方向移动,距台风中心200千米的范
热门考点
- 1已知扇形的周长是6,圆心角为60°,则扇形的面积是?
- 2在《谈谈辩证法》中,列宁怎样阐述辩证法也就是马克思主义认识论?
- 3125*5+169/13该如何简便计算
- 4高中函数图象的画法 有2种的说
- 5已知等差数列{an}满足:a2=2,a1+a5=a6,其前n项和为sn
- 6当a为何值时,方程组x+2y-6=0; 3x-y+3a=-8 有x=y
- 7把多项式xy-3分之2x的平方y的平方+ 5分之3x的立方y- 2分之1+10按字母x的降幂排列
- 8The sun is up.Time to get up.的意思是?
- 9I () the food and water out of the car.A.put B.carried C.took D.had
- 10叔叔阿姨哥哥姐姐帮我算一道数学题