I need a code snipplet with Reflection in ASP.net

  • Durum: Closed
  • Ödül: $10
  • Alınan Girdiler: 1
  • Kazanan: serkanbal

Yarışma Özeti

Just a simple code needed written in ASP.net and reflection.
Reflection is a must.

Please take a look attached file for more info and example.

I just want to make the code below working. Output does not work as expected! Shows the same result!


Public Class JoinTables
Public Class userz_N_user_roles
Public userz As New userz
Public user_roles As New user_roles
End Class
End Class
Public Class userz

Public Shared id As Nullable(Of Integer) = Nothing
Public user_name As String
Public email_email As String
Public user_pass As String

End Class

Public Class user_roles

Public id As Nullable(Of Integer) = Nothing
Public role_name As String
End Class

Protected Sub Page_Load(sender As Object, e As EventArgs) Handles [login to view URL]


Dim ArrayList_users As New ArrayList
Dim MyUser1 As New userz
myuser1.email_email = "1@[login to view URL]"
myuser1.user_name = "myuser1"
myuser1.user_pass = "mypass1"
[login to view URL](MyUser1)



Dim ArrayList_roles As New ArrayList
Dim MyUserRoles1 As New user_roles
[login to view URL] = "1"
MyUserRoles1.role_name = "Admin"
[login to view URL](MyUserRoles1)




Dim myuser2 As New userz
myuser2.email_email = "2@[login to view URL]"
myuser2.user_name = "myuser2"
myuser2.user_pass = "mypass2"
[login to view URL](myuser2)


Dim MyUserRoles2 As New user_roles
[login to view URL] = "1"
MyUserRoles2.role_name = "Admin"
[login to view URL](MyUserRoles2)


'############ REFLECTION PART ###############
Dim MyArrayList As New ArrayList 'for Response

Dim MyJoinTableClass As New JoinTables.userz_N_user_roles
Dim t As Type = [login to view URL]

[login to view URL]("userz", [login to view URL], Nothing, MyJoinTableClass, New Object() {MyUser1})
[login to view URL]("user_roles", [login to view URL], Nothing, MyJoinTableClass, New Object() {MyUserRoles1})
'MsgBox(MyUser1.user_name)
[login to view URL](MyJoinTableClass)

Dim MyJoinTableClass2 As New JoinTables.userz_N_user_roles
t = [login to view URL]
[login to view URL]("userz", [login to view URL], Nothing, MyJoinTableClass, New Object() {myuser2})
[login to view URL]("user_roles", [login to view URL], Nothing, MyJoinTableClass, New Object() {MyUserRoles2})

[login to view URL](MyJoinTableClass)


Dim filledJoinCls1 As New JoinTables.userz_N_user_roles
filledJoinCls1 = MyArrayList(0)
Dim filledJoinCls1_user1 As New userz
filledJoinCls1_user1 = [login to view URL]

MsgBox(filledJoinCls1_user1.user_name)

Dim filledJoinCls2 As New JoinTables.userz_N_user_roles
filledJoinCls2 = MyArrayList(1)
Dim filledJoinCls2_user2 As New userz
filledJoinCls2_user2 = [login to view URL]
MsgBox(filledJoinCls1_user1.user_name & " - " & filledJoinCls2_user2.user_name)


End Sub

Tavsiye Edilen Beceriler

Bu yarışmadan başlıca girdiler

Daha Fazla Katılım Görüntüle

Genel Açıklama Panosu

  • dinamito
    Yarışma Sahibi
    • 1 yıl önce

    @priyankabafna25 could you please send me the working code: exgentr@gmail.com thanks.

    • 1 yıl önce
    1. priyankabafna25
      priyankabafna25
      • 1 yıl önce

      Hello sir , I mention my solution on your reply please check entry message

      • 1 yıl önce
  • priyankabafna25
    priyankabafna25
    • 1 yıl önce

    Please check #1

    • 1 yıl önce

Yarışmalara nasıl başlanır

  • Projenizi ilan edin

    Yarışmanızı İlan Edin Hızlı ve kolay

  • Tonlarca girdi alın

    Tonlarca Girdi Alın Bütün dünyadan

  • En iyi girdiyi seçin

    En iyi girdiyi seçin Dosyaları indirin - Kolay!

Şimdi bir Yarışma İlan Et ya da Bugün Bize Katılın!