473,394 Members | 2,063 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,394 software developers and data experts.

.net Default method like vb6

I think that I have found that this is not supported
in .net (either vb.net or c#).

I would like to have my old default method attribute when
I built "classes" in vb6.

Is this possible?
Nov 22 '05 #1
2 1558
Hi Kevin,

Thanks for your post. Based on my experience and reseach, there is no
exactly the same VB6 default procedure ID setting in .NET. You can take a
look at DefaultMemberAttribute and DefaultPropertyAttribute in the links
below, however, we are not able to call DefaultMemberAttribute as in VB6
and DefaultPropertyAttribute is for components only.

DefaultMemberAttribute Class
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemreflectiondefaultmemberattributeclassto pic.asp

DefaultPropertyAttribute Class
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfSystemComponentModelDefaultPropertyAttributeC lassTopic.asp

Please feel free to let me know if you have any problems or concerns.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 22 '05 #2
Hi Kevin,

Thanks for your post. Based on my experience and reseach, there is no
exactly the same VB6 default procedure ID setting in .NET. You can take a
look at DefaultMemberAttribute and DefaultPropertyAttribute in the links
below, however, we are not able to call DefaultMemberAttribute as in VB6
and DefaultPropertyAttribute is for components only.

DefaultMemberAttribute Class
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemreflectiondefaultmemberattributeclassto pic.asp

DefaultPropertyAttribute Class
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfSystemComponentModelDefaultPropertyAttributeC lassTopic.asp

Please feel free to let me know if you have any problems or concerns.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 22 '05 #3

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

Similar topics

26
by: Alex Panayotopoulos | last post by:
Hello all, Maybe I'm being foolish, but I just don't understand why the following code behaves as it does: - = - = - = - class listHolder: def __init__( self, myList= ): self.myList =...
3
by: Frank Bechmann | last post by:
Eventually most of you will not learn much from this because it's just another event in the 'default argument value gotcha' series, but because it cost me some hours yesterday to spot this 'error'...
18
by: Clark Nu | last post by:
It seems that when I define a fuction,I can set a default value to some of the peremeters.When I call the fuction without some of them,the fuction will use the default value automaticlly then...
7
by: A.M | last post by:
Hi, Do we have default method parameter in C#? Something like this void method1(int i = 12) { .... }
2
by: Water Cooler v2 | last post by:
In VB.NET, how do you make a method the default method for the class in which it is declared? Then, once done, how do you use the default method?
44
by: gregory.petrosyan | last post by:
Hello everybody! I have little problem: class A: def __init__(self, n): self.data = n def f(self, x = ????) print x All I want is to make self.data the default argument for self.f(). (I
14
by: cody | last post by:
I got a similar idea a couple of months ago, but now this one will require no change to the clr, is relatively easy to implement and would be a great addition to C# 3.0 :) so here we go.. To...
74
by: Zytan | last post by:
I have a struct constructor to initialize all of my private (or public readonly) fields. There still exists the default constructor that sets them all to zero. Is there a way to remove the...
10
by: Brad Baker | last post by:
I have an asp.net/csharp application that requires a particular variable to work properly. This variable is usually passed via a query string in the URL when the application is first run but under...
6
by: s0suk3 | last post by:
I wanted to know if there's any way to create a method that takes a default parameter, and that parameter's default value is the return value of another method of the same class. For example: ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.