<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Takachan</author_name>
  <author_url>https://blog.hatena.ne.jp/Takachan/</author_url>
  <blog_title>PG日誌</blog_title>
  <blog_url>https://takap-tech.com/</blog_url>
  <categories>
    <anon>.NET Core</anon>
    <anon>.NET</anon>
    <anon>.NET Framework</anon>
    <anon>C#</anon>
    <anon>Tips</anon>
  </categories>
  <description>何度も何度も調べなおしてるので自分用のメモです。 他のプロセスが開いているファイルを開こうとすると以下のエラーが発生する。 System.IO.IOException: 別のプロセスで使用されているため、プロセスはファイル 'xxxx' にアクセスできません。 以下のように書けば読み取れるようになるが、確実に読み取れる訳ではない。 string filePath = &quot;c:\hoge\hoge.txt&quot;; using (var fs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakap-tech.com%2Fentry%2F2023%2F08%2F23%2F235352&quot; title=&quot;【C#】オープン中のファイルの内容を読み取る - PG日誌&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-08-23 23:53:52</published>
  <title>【C#】オープン中のファイルの内容を読み取る</title>
  <type>rich</type>
  <url>https://takap-tech.com/entry/2023/08/23/235352</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
