Re: Need Help, Trying to learn WCF

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Mr. Arnold,

You are correct, in the class that i created and working fine the only
public method is the
Public ReadOnly Property AmountDue() As Decimal
Get
Return AmountDueDecimal
End Get
End Property
this is the only method I wanted exposed in the class all the rest is
private to the class, which worked great.

I did get this working last night about midnight finally, I appearently had
the code correct, which was very close to what family tree mike also
responded with.
All I did was put all of the code from the class into the RoomRateService.vb
and then rename what was the Sub New() in the class to a Public Function in
the RoomRateServices.vb
which accepted all 5 arguments, then in the IRoomRateService.vb I aslo
reference the new Function.

Now come to find out all that was correct but I did not know it yesterday
(or day before when I first started). I thought that it was wrong because I
could not access any of these in the service from the form even though it
could sort of "see" them. Come to find out that when i created the
WFCService1 I did not catch that it saved that to another folder outside of
the folder where i was saving the application once this was brought to my
attention, i deleted that service and all reference to that service, I then
created a new Service and made sure that it got saved in the same folders as
my application and used created a new service reference to this new
WCFService2 using all of the same code it then worked! Now I can not
explain why that is per say i would think that it should have still worked
but it did not so I am at a loss to explain all i know is that is what i did
and it is now working.

So Thank you very much for your help!

Jeff

"Mr. Arnold" <Arnold@xxxxxxxxxx> wrote in message
news:O7MhHR5ZKHA.196@xxxxxxxxxxxxxxxxxxxxxxx
Jeff wrote:
ok, So In my original post where i have my code listed, isn't that how I
am doing it? I have it listed as how it worked when sending to a class
then how I am attempting to send to the Serivce.


Where is the word "Public" in any of your code on a class, method,
function etc, etc. Anything that is NOT marked as 'Public' is 'Private'.

http://www.startvbdotnet.com/oop/constructor.aspx

public: a field, method, or class that is accessible to every class.

protected: a field, method, or class that is accessible to the class
itself, subclasses, and all classes in the same package or directory.

friendly: a field, method, or class that is accessible to the class itself
and to all classes in the same package or directory. Note that friendly is
not a separate keyword. A field or method is declared friendly by virtue
of the absence of any other access modifiers.

private: a field or method that is accessible only to the class in which
it is defined. Note that a class can not be declared private as a whole.

http://www.angelfire.com/tx4/cus/shapes/vbnet.html


.



Relevant Pages

  • Re: How to organize repositories
    ... Imported a .inf file, added a package, added a repository, referenced the ... in the Group Memberships folder under the component I ... Group Memberships folder under the component I added a reference to the ...
    (microsoft.public.windowsxp.embedded)
  • DNS Question and AD (_msdcs folder)
    ... I thought I read somewhere that with a 2 NIC install on SBS 2003 (1 private ... folder you should not have any reference to the public IP ...
    (microsoft.public.windows.server.sbs)
  • Re: Return_By_Reference or Return_By_Copy (GNAT bug?)
    ... I was playing around with return by reference to see if it is possible to ... especially the protected object P in package C). ... package body B is ...
    (comp.lang.ada)
  • Re: select a folder
    ... This is all the reference in code I have to the folder browser: ... private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1; ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Fast Size Folder
    ... as far as I know that is exactly what Windows itself does when you right click a folder and choose Properties. ... Private Declare Sub CopyMemory Lib "kernel32" _ ... ByVal sDir As String) As Long ... Dim s1 As String, sectorsPerCluster As Long ...
    (microsoft.public.vb.general.discussion)