如何在C#中自定义的文件扩展名? [英] how to create a custom file extension in C#?

查看:1600
本文介绍了如何在C#中自定义的文件扩展名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要如何在我的C#应用​​程序自定义的文件扩展名的帮助。我创建了一个基本的笔记管理应用程序。现在,我救了我的笔记的.rtf(note1.rtf)。我希望能够创建一个只有我的应用程序可识别的文件扩展名(如,note.not,也许)

I need help in how to create a custom file extension in my C# app. I created a basic notes management app. Right now I'm saving my notes as .rtf (note1.rtf). I want to be able to create a file extension that only my app understands (like, note.not, maybe)

推荐答案

文件扩展您的格式任意选择,而且只有真正取决于您的应用程序注册一个特定的文件扩展名作为某种类型的Windows中的文件,安装时。

File extensions are an arbitrary choice for your formats, and it's only really dependent on your application registering a certain file extension as a file of a certain type in Windows, upon installation.

未来与自己的文件格式,通常意味着你使用,只有你的应用程序可以分析的格式保存格式。它可以是纯文本或二进制,它甚至可以使用XML或任何格式的,关键是你的应用程序应该能够很容易地解析它。

Coming up with your own file format usually means you save that format using a format that only your application can parse. It can either be in plain text or binary, and it can even use XML or whatever format, the point is your app should be able to parse it easily.

这篇关于如何在C#中自定义的文件扩展名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆