зеркало из https://github.com/mono/mail-archives.git
79 строки
2.8 KiB
HTML
79 строки
2.8 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Mono-list] Difference in Obsolete attribute behaviour
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:jakub.linhart%40vslib.cz">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
|
|
<LINK REL="Previous" HREF="025546.html">
|
|
<LINK REL="Next" HREF="025548.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Mono-list] Difference in Obsolete attribute behaviour
|
|
</H1>
|
|
<B>Jakub Linhart
|
|
</B>
|
|
<A HREF="mailto:jakub.linhart%40vslib.cz"
|
|
TITLE="[Mono-list] Difference in Obsolete attribute behaviour">jakub.linhart@vslib.cz
|
|
</A><BR>
|
|
<I>Tue, 01 Feb 2005 23:36:56 +0100</I>
|
|
<P><UL>
|
|
<LI> Previous message: <A HREF="025546.html">[Mono-list] HTML 4.01 and XHTML DOM Implementation?
|
|
</A></li>
|
|
<LI> Next message: <A HREF="025548.html">[Mono-list] MySQL Connection from .NET Website
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#25544">[ date ]</a>
|
|
<a href="thread.html#25544">[ thread ]</a>
|
|
<a href="subject.html#25544">[ subject ]</a>
|
|
<a href="author.html#25544">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>I have code like this:
|
|
1 class TestClass1 {
|
|
2 [Obsolete ("This method ObsoleteMethod1 is obsolete.", false)]
|
|
3 public static void ObsoleteMethod1() {
|
|
4 Console.WriteLine ("Executing ObsoleteMethod1()");
|
|
5 }
|
|
6 }
|
|
|
|
7 class TestClass2 {
|
|
8 [Obsolete ("This method ObsoleteMethod2 is obsolete.", true)]
|
|
9 public static void ObsoleteMethod2() {
|
|
10 TestClass1.ObsoleteMethod1();
|
|
11 }
|
|
12 public static void NewMethod2() {
|
|
13 TestClass1.ObsoleteMethod1();
|
|
14 ObsoleteMethod2();
|
|
15 }
|
|
16}
|
|
|
|
If this code fragment is compiled under .NET framework, CSC reports one
|
|
error (CS0619) on line 13 and one warning (CS0618) at line 14. You get
|
|
2 errors (line 10, line 13) and 1 warning (line 14) under MONO 1.05
|
|
(mcs). It looks like that CSC ignores every call to method marked as
|
|
obsolete from other obsolete method. MCS reports every call to obsolete
|
|
method as error or warning. Is it particular reason for such a behaviour?
|
|
|
|
</PRE>
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI> Previous message: <A HREF="025546.html">[Mono-list] HTML 4.01 and XHTML DOM Implementation?
|
|
</A></li>
|
|
<LI> Next message: <A HREF="025548.html">[Mono-list] MySQL Connection from .NET Website
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#25544">[ date ]</a>
|
|
<a href="thread.html#25544">[ thread ]</a>
|
|
<a href="subject.html#25544">[ subject ]</a>
|
|
<a href="author.html#25544">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
</body></html>
|