Habr
All streams
Search
Edit
Settings
Login
Pull to refresh
0
TIGERoX
@TIGERoX
User
1
Subscribers
Follow
Send message
Profile
Articles
Posts
News
Comments
3
More
Dropdown
Bookmarks
1
Followers
Following
1
Copy RSS link
C#: Этюды, часть 2
TIGERoX
Dec 2 2009 at 20:08
параметры дефолтные… я просто создал новый консольный проект
v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\ConsoleApplication2.exe /target:exe Program.cs Properties\AssemblyInfo.cs
C#: Этюды, часть 2
TIGERoX
Dec 2 2009 at 18:01
Кхм, а у меня срабатывает, тоже SP1 3.5. По стеку видно, что internal код вызывает GetCustomAttributes… ну и в результате логичное создание экземпляра нашего атрибута
C#: Этюды, часть 2
TIGERoX
Dec 2 2009 at 16:21
class App
{
[AutoStart()]
static void Main()
{
}
}
public class AutoStartAttribute: Attribute
{
public AutoStartAttribute()
{
Console.Beep();
}
}
Information
Rating
Does not participate
Location
Россия
Registered
August 5 2008
Activity
March 30 2012 at 13:59
v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\ConsoleApplication2.exe /target:exe Program.cs Properties\AssemblyInfo.cs
{
[AutoStart()]
static void Main()
{
}
}
public class AutoStartAttribute: Attribute
{
public AutoStartAttribute()
{
Console.Beep();
}
}