Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationDLL parameters - none required fieldsDLL parameters - none required fields
Previous
 
Next
New Post
6/15/2010 4:19 PM
 

I have created a DLL using C#. The DLL has to do with inserting records to a table. My DLL has around 15 parameters of which only 4 of them are required parameters and the rest are non mandatory. What is happening is my DLL requires that all parameters are required. I understand all parameters are required in a DLL?? Question is what do I need to do so that not all parameters are required. Any help would be appreciated.

Kris

 

 

 
New Post
6/16/2010 6:52 PM
 
C# only introduced optional parameters with .net 4.0, so if you're not developing in vs.net 2010 you can't use them (all versions of vb.net support optional parameters). Typically developers create additional overloads with shorter signatures in their dll's (that then call the larger signature versions passing in defaults), rather than use optional parameters.

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
6/26/2010 5:09 AM
 
Hello Kris

In additional to Cathal comments, I will add that Dine Esposito has a good article on the June 2010 MSDN magazine on C# 4.0 and the dynamic keyword.  He specifically refers to calling methods in MS Word with a bunch of optional params.  Maybe you can find that article online somewhere.  the Title was "C# 4.0, the Dynamic Keyword and Com".  His series is named Cutting Edge.




Mark Breen Ireland 1987 BMW R80 g/s
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationDLL parameters - none required fieldsDLL parameters - none required fields


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out