473,406 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Obeying MSDN documentation

Hi there,

I've frequently noticed quite a few .NET functions with the following MSDN
caveat:

"This method supports the .NET Framework infrastructure and is not intended
to be used directly from your code."

Does anyone know whether this officially means you can't use the function or
it's potentially dangerous if you do (and/or it's subject to possible change
by MSFT). If a function says it's for MSFT internal use only that's one
thing (I've seen these though I don't think MSFT should be publishing them
if they're off-limits). But, as an example, "Form.CenterToParent()" has the
above disclaimer but it still works and it's useful for re-centering a
window after manually alterting its size in some handler (e.g., "OnLoad()"
for instance). Is it therefore safe to use this function (and others) when
the circumstances warrant it or do you have to roll your own. Thanks in
advance.
Oct 13 '06 #1
5 1484
John Browning <no_spam@_nospam.comwrote:
I've frequently noticed quite a few .NET functions with the following MSDN
caveat:

"This method supports the .NET Framework infrastructure and is not intended
to be used directly from your code."

Does anyone know whether this officially means you can't use the function or
it's potentially dangerous if you do (and/or it's subject to possible change
by MSFT). If a function says it's for MSFT internal use only that's one
thing (I've seen these though I don't think MSFT should be publishing them
if they're off-limits). But, as an example, "Form.CenterToParent()" has the
above disclaimer but it still works and it's useful for re-centering a
window after manually alterting its size in some handler (e.g., "OnLoad()"
for instance). Is it therefore safe to use this function (and others) when
the circumstances warrant it or do you have to roll your own. Thanks in
advance.
There are a few instances of this where it's clearly sensible to call
the method directly - I seem to remember that some classes have Dispose
documented in this way. I'd be cautious, but not worry *too* much.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Oct 14 '06 #2
John Browning wrote:
Hi there,

I've frequently noticed quite a few .NET functions with the following MSDN
caveat:

"This method supports the .NET Framework infrastructure and is not intended
to be used directly from your code."

Does anyone know whether this officially means you can't use the function or
it's potentially dangerous if you do (and/or it's subject to possible change
by MSFT). If a function says it's for MSFT internal use only that's one
thing (I've seen these though I don't think MSFT should be publishing them
if they're off-limits). But, as an example, "Form.CenterToParent()" has the
above disclaimer but it still works and it's useful for re-centering a
window after manually alterting its size in some handler (e.g., "OnLoad()"
for instance). Is it therefore safe to use this function (and others) when
the circumstances warrant it or do you have to roll your own. Thanks in
advance.
Try to avoid using those methods if you can. If they change in the
future, the will probably not show up in the list of breaking changes.

Also, there may be limitations on how the methods can be used that isn't
mentioned in the public documentation, as the entry for the method is
mostly to explain why the method is there at all.

You can look up the method using .NET Reflector, and if it's easy to
implement you can just make your own method, and you are safe.
Oct 14 '06 #3
There are a few instances of this where it's clearly sensible to call
the method directly - I seem to remember that some classes have Dispose
documented in this way. I'd be cautious, but not worry *too* much.
Thanks for the feedback. I'm probably secure using them as you said but MSFT
should really spell things out more clearly (if it's documented then
presumably it can be used under the right circumstances regardless of the
disclaimer - hopefully). Thanks again.
Oct 14 '06 #4
Try to avoid using those methods if you can. If they change in the future,
the will probably not show up in the list of breaking changes.
In theory they shouldn't break functions however, only render them
"obsolete" (IMO anyway). I think the documentation hasn't matured enough yet
in any case (too sparse in general and there are even functions that have no
descriptive info at all)
Also, there may be limitations on how the methods can be used that isn't
mentioned in the public documentation, as the entry for the method is
mostly to explain why the method is there at all.
Agreed on the potential (hidden) limitations but I don't see why they
publish these functions if they're actually off-limits (or dangerous in the
absence of what these limitations are)
You can look up the method using .NET Reflector, and if it's easy to
implement you can just make your own method, and you are safe.
Agreed and it's probably safer but I didn't want to reinvent the wheel
either. Anyway, thanks for the info (appreciated).
Oct 14 '06 #5
"Jon Skeet [C# MVP]" <sk***@pobox.comwrote in message
news:MP************************@msnews.microsoft.c om...
There are a few instances of this where it's clearly sensible to call
the method directly - I seem to remember that some classes have Dispose
documented in this way. I'd be cautious, but not worry *too* much.
IIRC, there used to be a method in v1.x of the Framework which was used to
pop the Directory Browser dialog which was marked as being for Microsoft's
exclusive internal use or somesuch...

:-)
Oct 14 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Brian Henry | last post by:
This is just wierd... if I go to the MSDN web site and try to view an article like this... http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwebhttpbrowsercapabilitiesclasstopic.asp ...
1
by: Ole Hanson | last post by:
I would like to be able to generate documentation for a custom configuration file (xml) to enable future support engineers to understand applicable values to the various elements inside the...
1
by: Ole Hanson | last post by:
I would like to be able to generate documentation for a custom configuration file (xml) to enable future support engineers to understand applicable values to the various elements inside the...
10
by: Stamen Gortchev | last post by:
Hi all, I think there is an inherent problem with most examples on the internet (with MSDN, too!) showing datagrid's databinding. Here is, how they look like: ======================== On...
5
by: Howard Kaikow | last post by:
Why cannot MSFT publish correct/updated info in MSDN and KB? It is to MSFT's advantage to encourage us to migrate old code, and develop new code, with .NET, so they need to take extra care when...
7
by: Rico | last post by:
I'm hoping this isn't another one of Microsofts ever depleating free help things, but I had to re-install Visual Studio 2003 Enterprise on a clean installation of Windows XP Pro. When I hit the F1...
9
by: Mythran | last post by:
Can someone please point me to some articles explaining how to convert the code comment xml files into MSDN documentation? I've made some modifications to Enterprise Library and would like to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.